Fix the development only js-yaml dependency being included in the release builds (#2646)
This commit is contained in:
parent
402ddf5cc7
commit
dc2cc746cf
|
@ -163,6 +163,12 @@ if (isDevMode) {
|
||||||
processLocalesPlugin,
|
processLocalesPlugin,
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames)
|
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames)
|
||||||
|
}),
|
||||||
|
// webpack doesn't get rid of js-yaml even though it isn't used in the production builds
|
||||||
|
// so we need to manually tell it to ignore any imports for `js-yaml`
|
||||||
|
new webpack.IgnorePlugin({
|
||||||
|
resourceRegExp: /^js-yaml$/,
|
||||||
|
contextRegExp: /i18n$/
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,12 @@ if (isDevMode) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
}),
|
||||||
|
// webpack doesn't get rid of js-yaml even though it isn't used in the production builds
|
||||||
|
// so we need to manually tell it to ignore any imports for `js-yaml`
|
||||||
|
new webpack.IgnorePlugin({
|
||||||
|
resourceRegExp: /^js-yaml$/,
|
||||||
|
contextRegExp: /i18n$/
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue