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
12
12
.DS_Store
13
13
Thumbs.db
14
14
* .log
15
- .parcel-cache
Original file line number Diff line number Diff line change 5
5
"license" : " MIT" ,
6
6
"main" : " dist/index.js" ,
7
7
"module" : " dist-esm/index.js" ,
8
- "bundle" : " bundle/worker.js" ,
9
8
"scripts" : {
10
9
"prebuild" : " rimraf dist/ dist-esm/" ,
11
10
"build" : " run-p build:cjs build:es" ,
12
11
"build:cjs" : " tsc -p tsconfig.json" ,
13
12
"build:es" : " tsc -p tsconfig-esm.json" ,
14
13
"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 " ,
16
15
"test" : " run-s test:ava test:puppeteer:basic test:puppeteer:webpack" ,
17
16
"test:ava" : " cross-env TS_NODE_FILES=true ava" ,
18
17
"test:puppeteer:basic" : " puppet-run --plugin=mocha --bundle=./test/workers/:/workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts" ,
83
82
"execa" : " ^4.0.3" ,
84
83
"mocha" : " ^5.2.0" ,
85
84
"npm-run-all" : " ^4.1.5" ,
86
- "parcel" : " ^2.0.0-beta.1" ,
87
85
"puppet-run" : " ^0.11.1" ,
88
86
"puppet-run-plugin-mocha" : " ^0.10.0-alpha" ,
89
87
"raw-loader" : " ^4.0.1" ,
140
138
" *.js" ,
141
139
" *.mjs" ,
142
140
" *.ts"
143
- ],
144
- "targets" : {
145
- "bundle" : {
146
- "context" : " browser" ,
147
- "includeNodeModules" : true ,
148
- "outputFormat" : " global" ,
149
- "isLibrary" : true
150
- }
151
- }
141
+ ]
152
142
}
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