Skip to content

Commit 071861e

Browse files
change default target to web and adjust build
1 parent 9cc678d commit 071861e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"bin": "dist/cli.js",
88
"scripts": {
99
"build": "npm run -s build:babel && npm run -s build:self",
10-
"build:babel": "babel-node src/cli.js --no-compress --format cjs src/{cli,index}.js --presets env",
11-
"build:self": "node dist/cli.js --no-compress --format cjs src/{cli,index}.js",
10+
"build:babel": "babel-node src/cli.js --target=node --format cjs src/{cli,index}.js --presets env",
11+
"build:self": "node dist/cli.js --target=node --format cjs src/{cli,index}.js",
1212
"prepare": "npm run -s build",
1313
"prepare:babel": "babel --presets env src/*.js -d dist && npm t",
1414
"lint": "eslint src",

src/prog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default handler => {
1919
.option('--output, -o', 'Directory to place build files into')
2020
.option('--format, -f', 'Only build specified formats', 'es,cjs,umd')
2121
.option('--watch, -w', 'Rebuilds on any change', false)
22-
.option('--target', 'Specify your target environment', 'node')
22+
.option('--target', 'Specify your target environment', 'web')
2323
.option('--external', `Specify external dependencies, or 'none'`)
2424
.option('--globals', `Specify globals dependencies, or 'none'`)
2525
.example('microbundle --globals react=React,jquery=$')

0 commit comments

Comments
 (0)