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',
|
2020-02-26 18:40:53 +01:00
|
|
|
'@storybook/addon-backgrounds'
|
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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
})
|
|
|
|
config.plugins.push(new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
|
|
|
{
|
|
|
|
from: path.join('node_modules', '@fortawesome', 'fontawesome-free', 'webfonts'),
|
|
|
|
to: path.join('fonts', 'fontawesome'),
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}))
|
|
|
|
return config
|
|
|
|
},
|
2020-02-26 14:34:59 +01:00
|
|
|
}
|