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

24 lines
612 B
JavaScript
Raw Normal View History

// @ts-nocheck
const { ContextReplacementPlugin } = require('webpack');
2019-12-09 09:47:51 +02:00
const rootConfig = require('../webpack.config');
module.exports = async ({ config }) => ({
2020-05-24 02:08:24 +03:00
...config,
resolve: rootConfig.resolve,
2020-05-24 02:08:24 +03:00
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 09:47:51 +02:00
2020-05-24 02:08:24 +03:00
resolveLoader: rootConfig.resolveLoader,
plugins: [
...config.plugins,
...rootConfig.plugins.filter((plugin) => plugin instanceof ContextReplacementPlugin),
],
2019-12-09 09:47:51 +02:00
});