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 23, 2020
1 parent 7f34b3d commit cc653e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/webpack.config.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const commitSha = process.env.hasOwnProperty( 'COMMIT_SHA' ) ? process.env.COMMI
*
* @returns {Array} list of externals
*/

function getExternals() {
return [
// Don't bundle any node_modules, both to avoid a massive bundle, and problems
Expand All @@ -68,10 +69,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 cc653e8

Please sign in to comment.