Improve storybook's performance by not building all possible locales/countries flags

This commit is contained in:
ErickSkrauch 2020-07-09 21:59:17 +03:00
parent 70070ef516
commit 1dfe85e736
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E
1 changed files with 9 additions and 0 deletions

View File

@ -1,8 +1,12 @@
// @ts-nocheck
const { ContextReplacementPlugin } = require('webpack');
const rootConfig = require('../webpack.config');
module.exports = async ({ config }) => ({
...config,
resolve: rootConfig.resolve,
module: {
...config.module,
// our rules should satisfy all storybook needs,
@ -11,4 +15,9 @@ module.exports = async ({ config }) => ({
},
resolveLoader: rootConfig.resolveLoader,
plugins: [
...config.plugins,
...rootConfig.plugins.filter((plugin) => plugin instanceof ContextReplacementPlugin),
],
});