Skip to content

Commit

Permalink
Bundle packages in the monorepo to
Browse files Browse the repository at this point in the history
  • Loading branch information
scinos committed Oct 30, 2020
1 parent 04ada0c commit 8787b52
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/webpack.config.node.js
Expand Up @@ -60,6 +60,7 @@ function getMonorepoPackages() {
*
* @returns {Array} list of externals
*/

function getExternals() {
return [
// Don't bundle any node_modules, both to avoid a massive bundle, and problems
Expand All @@ -82,10 +83,8 @@ function getExternals() {

/^calypso\//,

// Packages in the monorepo that have a `calypso:src` field
...packagesInMonorepo()
.filter( ( pkg ) => pkg[ 'calypso:src' ] )
.map( ( pkg ) => pkg.name ),
// Packages in the monorepo
...packagesInMonorepo().map( ( pkg ) => pkg.name ),
],
} ),
// Some imports should be resolved to runtime `require()` calls, with paths relative
Expand Down

0 comments on commit 8787b52

Please sign in to comment.