2020-07-10 00:29:17 +05:30
|
|
|
// @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-07-10 00:29:17 +05:30
|
|
|
|
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,
|
2020-07-10 00:29:17 +05:30
|
|
|
|
|
|
|
plugins: [
|
|
|
|
...config.plugins,
|
|
|
|
...rootConfig.plugins.filter((plugin) => plugin instanceof ContextReplacementPlugin),
|
|
|
|
],
|
2019-12-09 13:17:51 +05:30
|
|
|
});
|