2020-11-30 21:10:46 +01:00
|
|
|
const path = require('path')
|
|
|
|
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
|
|
|
2020-02-26 14:34:59 +01:00
|
|
|
module.exports = {
|
2020-08-11 15:29:24 +02:00
|
|
|
stories: ['../ui/app/**/*.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) => {
|
|
|
|
config.module.strictExportPresence = true
|
|
|
|
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: {
|
|
|
|
includePaths: ['ui/app/css/'],
|
|
|
|
},
|
2020-11-30 21:10:46 +01: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'),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
)
|
2020-11-30 21:10:46 +01:00
|
|
|
return config
|
|
|
|
},
|
2020-02-26 14:34:59 +01:00
|
|
|
}
|