Skip to content

Commit 1cd01ac

Browse files
committed
Revert "use parcel to bundle instead of rollup"
This reverts commit 3b88852.
1 parent 1e2d2da commit 1cd01ac

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.gitignore

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

package.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
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",
@@ -83,7 +82,6 @@
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",
@@ -140,13 +138,5 @@
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
}

rollup.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
};

0 commit comments

Comments
 (0)