2021-04-28 21:53:59 +02:00
|
|
|
const path = require('path');
|
2020-11-30 21:10:46 +01:00
|
|
|
|
2021-04-28 21:53:59 +02:00
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
2020-11-30 21:10:46 +01:00
|
|
|
|
2020-02-26 14:34:59 +01:00
|
|
|
module.exports = {
|
2021-04-28 21:53:59 +02:00
|
|
|
stories: ['../ui/**/*.stories.js'],
|
2020-02-26 14:34:59 +01:00
|
|
|
addons: [
|
|
|
|
'@storybook/addon-knobs',
|
|
|
|
'@storybook/addon-actions',
|
2021-01-19 17:54:32 +01:00
|
|
|
'@storybook/addon-backgrounds',
|
2021-02-06 03:28:54 +01:00
|
|
|
'@storybook/addon-toolbars',
|
2021-02-08 16:45:06 +01:00
|
|
|
'./i18n-party-addon/register.js',
|
2020-02-26 14:34:59 +01:00
|
|
|
],
|
2020-11-30 21:10:46 +01:00
|
|
|
webpackFinal: async (config) => {
|
2021-04-28 21:53:59 +02:00
|
|
|
config.module.strictExportPresence = true;
|
2020-11-30 21:10:46 +01:00
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.scss$/,
|
|
|
|
loaders: [
|
|
|
|
'style-loader',
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
import: false,
|
|
|
|
url: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'resolve-url-loader',
|
|
|
|
{
|
|
|
|
loader: 'sass-loader',
|
|
|
|
options: {
|
|
|
|
sourceMap: true,
|
2021-01-19 17:54:32 +01:00
|
|
|
implementation: require('sass'),
|
2021-01-20 16:58:03 +01:00
|
|
|
sassOptions: {
|
2021-04-28 21:53:59 +02:00
|
|
|
includePaths: ['ui/css/'],
|
2021-01-20 16:58:03 +01:00
|
|
|
},
|
2020-11-30 21:10:46 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-04-28 21:53:59 +02:00
|
|
|
});
|
2021-01-19 17:54:32 +01:00
|
|
|
config.plugins.push(
|
|
|
|
new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
|
|
|
{
|
|
|
|
from: path.join(
|
|
|
|
'node_modules',
|
|
|
|
'@fortawesome',
|
|
|
|
'fontawesome-free',
|
|
|
|
'webfonts',
|
|
|
|
),
|
|
|
|
to: path.join('fonts', 'fontawesome'),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
2021-04-28 21:53:59 +02:00
|
|
|
);
|
|
|
|
return config;
|
2020-11-30 21:10:46 +01:00
|
|
|
},
|
2021-04-28 21:53:59 +02:00
|
|
|
};
|