Skip to content

Commit

Permalink
Support global extend via amdName
Browse files Browse the repository at this point in the history
Using a prefixed name like `{ "amdName": "global.foo" }` will trigger Rollup's `output.extend` option. This addresses the use-case from #709 without adding another CLI flag.
  • Loading branch information
developit authored Aug 31, 2020
1 parent d08f977 commit 0005a96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ function createConfig(options, entry, format, writeMeta) {
return shebang[options.name];
},
format: modern ? 'es' : format,
name: options.name,
name: options.name && options.name.replace(/^global\./, ''),
extend: /^global\./.test(options.name),
dir: outputDir,
entryFileNames: outputEntryFileName,
},
Expand Down

0 comments on commit 0005a96

Please sign in to comment.