Skip to content

Commit 1e2d2da

Browse files
committed
use parcel to bundle instead of rollup
1 parent f683da4 commit 1e2d2da

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ test/workers/*.js
1212
.DS_Store
1313
Thumbs.db
1414
*.log
15+
.parcel-cache

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"license": "MIT",
66
"main": "dist/index.js",
77
"module": "dist-esm/index.js",
8+
"bundle": "bundle/worker.js",
89
"scripts": {
910
"prebuild": "rimraf dist/ dist-esm/",
1011
"build": "run-p build:cjs build:es",
1112
"build:cjs": "tsc -p tsconfig.json",
1213
"build:es": "tsc -p tsconfig-esm.json",
1314
"postbuild": "run-s bundle",
14-
"bundle": "rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist-esm/worker/bundle-entry.js",
15+
"bundle": "parcel build --target bundle src/worker/bundle-entry.ts",
1516
"test": "run-s test:ava test:puppeteer:basic test:puppeteer:webpack",
1617
"test:ava": "cross-env TS_NODE_FILES=true ava",
1718
"test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:/workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
@@ -82,6 +83,7 @@
8283
"execa": "^4.0.3",
8384
"mocha": "^5.2.0",
8485
"npm-run-all": "^4.1.5",
86+
"parcel": "^2.0.0-beta.1",
8587
"puppet-run": "^0.11.1",
8688
"puppet-run-plugin-mocha": "^0.10.0-alpha",
8789
"raw-loader": "^4.0.1",
@@ -138,5 +140,13 @@
138140
"*.js",
139141
"*.mjs",
140142
"*.ts"
141-
]
143+
],
144+
"targets": {
145+
"bundle": {
146+
"context": "browser",
147+
"includeNodeModules": true,
148+
"outputFormat": "global",
149+
"isLibrary": true
150+
}
151+
}
142152
}

rollup.config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)