-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (33 loc) · 916 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
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './app/index',
output: {
path: __dirname + '/dist',
filename: 'bundle.js'
},
plugins: [
new HtmlWebpackPlugin({
template: './app/index.tmpl.html'
}),
new webpack.ProvidePlugin({
riot: 'riot'
})
],
resolve: {
extensions: ['', '.tag', '.js'],
root: __dirname + '/app'
},
module: {
loaders: [
{ test: /\.tag$/, include: /app/, loader: 'riotjs!riotjs-style-plus' },
{ test: /\.js$/, include: /app/, loader: 'babel' },
{ test: /\.styl$/, include: /app/, loader: 'style!css?minimize!stylus' },
{ test: /\.css$/, include: /node_modules/, loader: 'style!css' },
{ test: /\.png$|\.jpg$/, include: /app/, loader: 'file?name=[path][name].[ext]' }
]
},
devServer: {
contentBase: __dirname + '/dist'
}
};