-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
53 lines (39 loc) · 1.05 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
var webpack = require('webpack')
// postcss plugins
var cssimport = require('postcss-import')
var customProperties = require('postcss-custom-properties')
var autoprefixer = require('autoprefixer')
var csswring = require('csswring')
var cssnested = require('postcss-nested')
module.exports = {
entry: {
app : ['./src/index.js']
},
output: {
path: __dirname + '/build/',
filename: 'bundle.js'
},
devtool: 'eval',
debug: true,
plugins: [
new webpack.ProvidePlugin({
riot: 'riot'
})
],
module: {
preLoaders: [
{ test: /\.tag$/, exclude: /node_modules/, loader: 'riotjs-loader', query: { type: 'es6' } }
],
loaders: [
{ test: /\.js|\.tag$/, exclude: /node_modules/, include: /src/, loader: 'babel-loader', query: {modules: 'common'} },
{ test: /\.css$/, loader: 'style-loader!css-loader!postcss-loader' }
]
},
postcss: [cssimport, cssnested, customProperties, autoprefixer, csswring],
devServer: {
contentBase: './build/',
port: 4000,
hot: true,
inline: true
}
}