Skip to content

Commit 41bf8d6

Browse files
committed
chore(rollup): add auto externals plugin
I'm keeping the existing external key because the auto externals plugin doesn't capture @babel/runtime.
1 parent 8064c67 commit 41bf8d6

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

package-lock.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"prettier": "2.4.0",
105105
"process": "0.11.10",
106106
"rollup": "2.56.3",
107+
"rollup-plugin-auto-external": "2.0.0",
107108
"rollup-plugin-copy": "3.4.0",
108109
"rollup-plugin-ignore": "1.0.10",
109110
"rollup-plugin-polyfill-node": "0.7.0",

rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { string } from 'rollup-plugin-string';
1616
import svgo from 'rollup-plugin-svgo';
1717
import webworkerLoader from 'rollup-plugin-web-worker-loader';
1818
import copy from 'rollup-plugin-copy';
19+
import autoExternal from 'rollup-plugin-auto-external';
1920

2021
import packageJSON from './package.json';
2122

@@ -98,6 +99,7 @@ export default {
9899
},
99100
external: Object.keys(packageJSON.dependencies).map((name) => new RegExp(`^${name}`)),
100101
plugins: [
102+
autoExternal(),
101103
alias({
102104
entries: [
103105
{ find: 'vtk.js', replacement: path.resolve(__dirname) },

0 commit comments

Comments
 (0)