accounts-frontend/.storybook/webpack.config.js

24 lines
612 B
JavaScript
Raw Normal View History

// @ts-nocheck
const { ContextReplacementPlugin } = require('webpack');
2019-12-09 13:17:51 +05:30
const rootConfig = require('../webpack.config');
module.exports = async ({ config }) => ({
2020-05-24 04:38:24 +05:30
...config,
resolve: rootConfig.resolve,
2020-05-24 04:38:24 +05:30
module: {
...config.module,
// our rules should satisfy all storybook needs,
// so replace all storybook defaults with our rules
rules: rootConfig.module.rules,
},
2019-12-09 13:17:51 +05:30
2020-05-24 04:38:24 +05:30
resolveLoader: rootConfig.resolveLoader,
plugins: [
...config.plugins,
...rootConfig.plugins.filter((plugin) => plugin instanceof ContextReplacementPlugin),
],
2019-12-09 13:17:51 +05:30
});