-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (40 loc) · 1.1 KB
/
webpack.config.js
File metadata and controls
43 lines (40 loc) · 1.1 KB
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 path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var precss = require('precss');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: "./demo/demo.js",
output: {
path: path.join(__dirname, 'dist'),
filename: 'app.js',
publicPath: '/dist/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
// new webpack.optimize.UglifyJsPlugin({
// sourceMap: false,
// mangle: false
// })
],
module: {
loaders: [
{
test: /\.less$/,
loader: "style!css!less"
}, {
test: /\.css$/,
loader: "style!css"
}, {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: "babel"
}
],
postcss: function () {
return [autoprefixer, precss];
}
},
};