-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.base.js
44 lines (43 loc) · 1.39 KB
/
webpack.config.base.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
const Webpack = require('webpack')
const BuildNotifier = require('webpack-build-notifier')
const PostStylus = require('poststylus')
const Autoprefixer = require('autoprefixer')
module.exports = storybook_base_config_ => {
return {
module: {
rules: [
{
test: /\.ts$/,
use: [
{ loader: 'babel-loader' },
{
loader: 'ts-loader',
options: { appendTsSuffixTo: [/\.vue$/], silent: true },
},
],
},
{ test: /\.vue$/, use: [{ loader: 'vue-loader' }] },
{
test: /\.styl$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader', options: { modules: true } },
{ loader: 'stylus-loader' },
],
},
{ test: /\.(woff|woff2)$/, use: [{ loader: 'url-loader' }] },
{
test: /\.svg$/,
use: [{ loader: 'svg-inline-loader', options: { removingTagAttrs: ['fill'] } }],
},
],
},
resolve: { extensions: ['.js', '.ts'], alias: { vue: 'vue/dist/vue.esm.js' } },
plugins: [
new Webpack.LoaderOptionsPlugin({
options: { stylus: { use: [PostStylus([Autoprefixer({ browsers: ['last 2 versions', 'ie >= 11'] })])] } },
}),
new BuildNotifier({ title: 'vue-lds', successSound: false, suppressCompileStart: false, onClick: () => null }),
],
}
}