File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,3 @@ test/workers/*.js
1212.DS_Store
1313Thumbs.db
1414* .log
15- .parcel-cache
Original file line number Diff line number Diff line change 55 "license" : " MIT" ,
66 "main" : " dist/index.js" ,
77 "module" : " dist-esm/index.js" ,
8- "bundle" : " bundle/worker.js" ,
98 "scripts" : {
109 "prebuild" : " rimraf dist/ dist-esm/" ,
1110 "build" : " run-p build:cjs build:es" ,
1211 "build:cjs" : " tsc -p tsconfig.json" ,
1312 "build:es" : " tsc -p tsconfig-esm.json" ,
1413 "postbuild" : " run-s bundle" ,
15- "bundle" : " parcel build --target bundle src /worker/bundle-entry.ts " ,
14+ "bundle" : " rollup -c -f umd --file= bundle/worker.js --name=threads --silent -- dist-esm /worker/bundle-entry.js " ,
1615 "test" : " run-s test:ava test:puppeteer:basic test:puppeteer:webpack" ,
1716 "test:ava" : " cross-env TS_NODE_FILES=true ava" ,
1817 "test:puppeteer:basic" : " puppet-run --plugin=mocha --bundle=./test/workers/:/workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts" ,
8382 "execa" : " ^4.0.3" ,
8483 "mocha" : " ^5.2.0" ,
8584 "npm-run-all" : " ^4.1.5" ,
86- "parcel" : " ^2.0.0-beta.1" ,
8785 "puppet-run" : " ^0.11.1" ,
8886 "puppet-run-plugin-mocha" : " ^0.10.0-alpha" ,
8987 "raw-loader" : " ^4.0.1" ,
140138 " *.js" ,
141139 " *.mjs" ,
142140 " *.ts"
143- ],
144- "targets" : {
145- "bundle" : {
146- "context" : " browser" ,
147- "includeNodeModules" : true ,
148- "outputFormat" : " global" ,
149- "isLibrary" : true
150- }
151- }
141+ ]
152142}
Original file line number Diff line number Diff line change 1+ const commonjs = require ( "@rollup/plugin-commonjs" )
2+ const { nodeResolve } = require ( "@rollup/plugin-node-resolve" )
3+
4+ module . exports = {
5+ plugins : [
6+ nodeResolve ( {
7+ browser : true ,
8+ mainFields : [ "module" , "main" ] ,
9+ preferBuiltins : true
10+ } ) ,
11+
12+ commonjs ( )
13+ ]
14+ } ;
You can’t perform that action at this time.
0 commit comments