Skip to content

Commit 6108cbd

Browse files
committed
added build all & run script
1 parent 533fef2 commit 6108cbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

example/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"license": "MIT",
66
"scripts": {
77
"debug": "esbuild app.js --bundle --format=cjs --outfile=bundle.js --loader:.js=jsx --sourcemap --preserve-symlinks",
8-
"build": "esbuild ../src/index.js \"--define:process.env.NODE_ENV='production'\" --external:react --bundle --format=cjs --loader:.js=jsx --outdir=../dist && cp -f ../dist/index.js ./index.js",
9-
"start": "esbuild app.js --bundle --format=cjs --outfile=bundle.js --loader:.js=jsx | npx serve"
8+
"build:comp": "esbuild ../src/index.js \"--define:process.env.NODE_ENV='production'\" --external:react --bundle --format=cjs --loader:.js=jsx --outdir=../dist && cp -f ../dist/index.js ./index.js",
9+
"build:app": "esbuild app.js --bundle --format=cjs --outfile=bundle.js --loader:.js=jsx",
10+
"start": "npm run build:comp | npm run build:app | npx serve"
1011
},
1112
"alias": {
1213
"react": "./node_modules/react"

0 commit comments

Comments
 (0)