chore: small bundle size follow up (#24164)

* update config

* replace react function

* fix alert
This commit is contained in:
二货机器人 2020-05-14 20:54:49 +08:00 committed by GitHub
parent be0c654fff
commit 2afab58ac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 108 additions and 75 deletions

View file

@ -56,7 +56,6 @@ function processWebpackThemeConfig(themeConfig, theme, vars) {
themeConfig.forEach(config => {
ignoreMomentLocale(config);
externalMoment(config);
injectWarningCondition(config);
// rename default entry to ${theme} entry
Object.keys(config.entry).forEach(entryName => {
@ -87,6 +86,10 @@ const webpackConfig = getWebpackConfig(false);
const webpackDarkConfig = getWebpackConfig(false);
const webpackCompactConfig = getWebpackConfig(false);
webpackConfig.forEach(config => {
injectWarningCondition(config);
});
if (process.env.RUN_ENV === 'PRODUCTION') {
webpackConfig.forEach(config => {
ignoreMomentLocale(config);