-
Notifications
You must be signed in to change notification settings - Fork 14
/
main.js
46 lines (42 loc) · 932 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
core: {
builder: 'webpack5',
},
addons: [
{
name: '@storybook/addon-links',
},
{
name: '@storybook/addon-essentials',
options: {
"actions": true,
"backgrounds": true,
"controls": true,
"docs": false,
"viewport": true,
"toolbars": true,
}
}
],
features: {
postcss: true,
},
plugins: [
require('postcss-flexbugs-fixes'),
require('autoprefixer')({
flexbox: 'no-2009',
}),
],
stories: [],
webpackFinal: async (config) => {
const tsPaths = new TsconfigPathsPlugin({
configFile: './tsconfig.base.json',
});
config.resolve.plugins
? config.resolve.plugins.push(tsPaths)
: (config.resolve.plugins = [tsPaths]);
// add your own webpack tweaks if needed
return config;
},
};