Skip to content

Commit 10ea516

Browse files
committed
install old rollup in a script
1 parent cfbd2d1 commit 10ea516

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rollup-script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const child_process = require('child_process');
22
const path = require('path')
33

44
if (parseFloat(process.version.match(/^v(\d+\.\d+)/)[1]) < 10) {
5+
child_process.spawnSync(`npm install rollup@1`, {stdio: 'inherit'})
56
child_process.spawnSync(`node ${path.resolve('./node_modules/rollup-old/dist/bin/rollup')} -c -f umd --file=bundle/worker.js --name=threads -- dist-esm/worker/bundle-entry.js`, {stdio: 'inherit'})
67
} else {
78
child_process.spawnSync(`node ${path.resolve('./node_modules/rollup/dist/bin/rollup')} -c -f umd --file=bundle/worker.js --name=threads -- dist-esm/worker/bundle-entry.js`, {stdio: 'inherit'})

0 commit comments

Comments
 (0)