Skip to content

Commit

Permalink
fix: expose --module-name
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed May 14, 2020
1 parent 8097516 commit 4579b00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cli.ts
Expand Up @@ -21,6 +21,7 @@ cli
.option('--watch', 'Watch mode')
.option('--define.* <value>', 'Define compile-time constants')
.option('--external <name>', 'Mark specific packages as external (use with --bundle)')
.option('--module-name <name>', 'Module name (with with --format umd)')
.option('--jsxFactory <jsxFactory>', 'Name of JSX factory function', {
default: 'React.createElement',
})
Expand All @@ -42,6 +43,7 @@ cli
outDir: options.outDir,
define: options.define,
external: options.external,
moduleName: options.moduleName
})
if (options.watch) {
const watcher = watch(
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Expand Up @@ -20,6 +20,7 @@ type Options = {
jsxFragment?: string
outDir: string
format: ModuleFormat
moduleName?: string
define?: {
[k: string]: string
}
Expand Down Expand Up @@ -76,7 +77,8 @@ export async function createRollupConfigs(files: string[], options: Options) {
outputConfig: {
dir: options.outDir,
format: options.format,
exports: 'named'
exports: 'named',
name: options.moduleName
},
}
}
Expand Down

0 comments on commit 4579b00

Please sign in to comment.