forked from yuzhva/react-leaflet-markercluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
43 lines (42 loc) · 1009 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
43
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './demo-app/main.js',
output: {
path: __dirname,
filename: './demo-app/dist/scripts.js'
},
devServer: {
port: 8080,
contentBase: __dirname
},
module: {
rules: [
{
test: /.js?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: [
['es2015', {modules: false}],
'react'
]
}
}, {
test: /\.css$/,
loader:'style-loader!css-loader'
}, {
test: /\.scss$/,
exclude: /components/,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader!sass-loader'
})
}
]
},
plugins: [
new ExtractTextPlugin('./demo-app/dist/styles.css'),
new HtmlWebpackPlugin({template: './demo-app/index.template.html'})
]
};