Skip to content

Commit

Permalink
Exclude node_modules from transitive dependencies in bundle.
Browse files Browse the repository at this point in the history
Since the last changes due to an unknown reason some of the transitive
dependencies in the `node_modules` folder of dependencies were also
transpiled with Babel and bundled. However, this is not necessary since
they're going to be installed together with this package in the target
environment.

Hence we exclude all `node_modules` folders from inclusion in the final
bundle.
  • Loading branch information
Philipp Jardas committed Sep 9, 2022
1 parent 0bf0b5c commit a9b2cdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-singers-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qualifyze/design-system': patch
---

Exclude node_modules from transitive dependencies in bundle.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
},
plugins: [
resolve({ preferBuiltins: true, extensions: ['.js', '.jsx'] }),
babel({ babelHelpers: 'bundled' }),
babel({ babelHelpers: 'bundled', exclude: /node_modules/ }),
commonjs(),
styles(),
],
Expand Down

0 comments on commit a9b2cdc

Please sign in to comment.