-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (42 loc) · 1.14 KB
/
Copy pathwebpack.config.js
File metadata and controls
43 lines (42 loc) · 1.14 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 webpack = require('webpack');
var path = require('path');
module.exports = {
entry: {
main:[
'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000',
'./public/javascripts/app/main.jsx'
]},
output: {
path: path.resolve(__dirname, "public/build"),
publicPath: '/',
filename: '[name].js'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{
test: /\.js[x]$/,
exclude: /node_modules/,
loaders: [ "babel" ],
include: path.join(__dirname, 'public/javascripts')
},
{
test: /\.js$/,
loaders: [ "babel" ],
},
{ test: /\.css$/,
loaders: ["style-loader","css-loader", "postcss-loader"]
},
{ test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
loader: 'url-loader?limit=50000&name=[path][name].[ext]'
}
],
},
postcss: function(){
return [require('autoprefixer'), require('postcss-cssnext')];
}
};