fix(web): add support for barrel exports in web build (#7354)

This commit is contained in:
Jack Hsu 2021-10-14 10:07:51 -04:00 committed by GitHub
parent fc3573f1ca
commit f9fe52bb18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,7 @@
"namedChunks": false, "namedChunks": false,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"webpackConfig": "dep-graph/dep-graph/webpack.config.js",
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",

View File

@ -0,0 +1,6 @@
// This is a workaround for a problem in Nx 13.0.0-beta.7
// TODO(jack): Can remove this after we patch Nx in 13.0.0 beta.8 or final release.
module.exports = (config) => {
config.optimization.providedExports = true;
return config;
};

View File

@ -112,7 +112,6 @@ export function getBaseWebpackPartial(
if (isScriptOptimizeOn) { if (isScriptOptimizeOn) {
webpackConfig.optimization = { webpackConfig.optimization = {
sideEffects: false, sideEffects: false,
providedExports: false,
minimizer: [ minimizer: [
new TerserWebpackPlugin({ new TerserWebpackPlugin({
parallel: true, parallel: true,