forked from typicode/hotel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
42 lines (41 loc) · 905 Bytes
/
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
const webpack = require('webpack')
const simpleVars = require('postcss-simple-vars')
module.exports = {
entry: './src/client/main.js',
output: {
path: './src/daemon/public',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel'
},
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.css$/,
loaders: ['style', 'css', 'postcss']
},
{
test: /\.(eot|svg|ttf|woff(2)?)(\?v=\d+\.\d+\.\d+)?/,
loader: 'url'
}
]
},
plugins: [
// window.fetch polyfill
// See https://gist.github.com/Couto/b29676dd1ab8714a818f
new webpack.ProvidePlugin({
'Promise': 'exports?global.Promise!es6-promise',
'fetch': 'exports?self.fetch!whatwg-fetch'
})
],
postcss: function () {
return [simpleVars]
}
}