2023-01-24 20:16:14 +03:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const { merge } = require('webpack-merge');
|
|
|
|
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
|
|
|
|
2022-08-30 11:03:14 +03:00
|
|
|
module.exports = {
|
|
|
|
stories: [],
|
|
|
|
addons: [
|
|
|
|
'@storybook/addon-essentials',
|
|
|
|
'@storybook/addon-links',
|
|
|
|
'@storybook/addon-interactions',
|
|
|
|
'storybook-dark-mode/register',
|
|
|
|
],
|
2023-01-24 20:16:14 +03:00
|
|
|
webpackFinal: async (config, { configType }) => {
|
|
|
|
return merge(config, {
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
__CLIENT__: 'true',
|
|
|
|
__SERVER__: false,
|
|
|
|
__DEVELOPMENT__: true,
|
|
|
|
__DEVTOOLS__: true, // <-------- DISABLE redux-devtools HERE
|
|
|
|
CONSOLE_ASSET_VERSION: Date.now().toString(),
|
|
|
|
}),
|
|
|
|
// un comment this to test out the circular deps. Left here since it can be tricky to configure
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
fallback: {
|
|
|
|
fs: false,
|
|
|
|
os: false,
|
|
|
|
http: false,
|
|
|
|
path: require.resolve('path-browserify'),
|
|
|
|
crypto: false,
|
|
|
|
util: require.resolve('util/'),
|
|
|
|
stream: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
2022-08-30 11:03:14 +03:00
|
|
|
};
|