-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
65 lines (64 loc) · 1.43 KB
/
webpack.config.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const webpack = require('webpack')
const path = require('path')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, 'lib'),
library: 'fractalis',
libraryTarget: 'var',
filename: 'fractal.js',
hotUpdateChunkFilename: 'hot/hot-update.js',
hotUpdateMainFilename: 'hot/hot-update.json'
},
module: {
rules: [
{
test: /\.vue$/,
exclude: /node_modules/,
loader: 'vue-loader',
options: {
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax'
}
}
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.sass$/,
exclude: /node_modules/,
loader: 'style-loader!css-loader!sass-loader?indentedSyntax'
},
{
test: /\.(woff2?|ttf)$/,
exclude: /node_modules/,
use: 'base64-inline-loader?limit=1000&name=[name].[ext]'
}
]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'assets': path.resolve(__dirname, 'src/assets')
}
},
performance: {
hints: false
},
devtool: '#inline-source-map',
context: __dirname,
target: 'web',
devServer: {
host: '0.0.0.0',
port: '8080',
hot: true,
inline: true,
headers: { 'Access-Control-Allow-Origin': '*' }
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
}