forked from xgnid-tw/Cyinf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 1.07 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
var path = require( 'path' );
var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
module.exports = {
entry: {
index: "./resources/assets/js/views/index.jsx",
courseDetail: "./resources/assets/js/views/courseDetail.jsx",
notification: "./resources/assets/js/views/notification.jsx"
},
output: {
path: path.resolve( __dirname, './public/Curr/js/views' ),
publicPath: './public/Curr/js/views',
filename: "[name].js"
},
resolve: {
extensions: [ '', '.js', '.jsx' ]
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query:{
"presets": ["es2015", "react"]
}
},{
test: /\.scss$/,
loader: 'style!css!sass?sourceMap'//loaders: ['style-loader', 'css-loader', /*'sass-loader',*/ 'postcss-loader']
}
]
},
plugins: [
new CommonsChunkPlugin('commons.js')
]
}