-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (44 loc) · 1.36 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
37
38
39
40
41
42
43
44
45
var webpack = require('webpack');
var path = require('path');
var webpackDevConfig = require('./webpack.dev.config');
var webpackProConfig = require('./webpack.production.config');
if (process.env.NODE_ENV === 'production') {
module.exports = webpackProConfig
}else {
module.exports = webpackDevConfig
}
// var publicPath = 'http://localhost:3000/';
// var hotMiddlewareScript = 'webpack-hot-middleware/client?reload=true';
//
// var devConfig = {
// entry: {
// home: ['./client/home', hotMiddlewareScript],
// admin: ['./client/admin', hotMiddlewareScript]
// },
// output: {
// filename: './[name]/bundle.js',
// path: path.resolve(__dirname, './public'),
// publicPath: publicPath
// },
// devtool: 'eval-source-map',
// module: {
// rules: [{
// test: /\.(png|jpg)$/,
// use: 'url-loader?limit=8192&context=client&name=[path][name].[ext]'
// }, {
// test: /\.scss$/,
// use: [
// 'style-loader',
// 'css-loader?sourceMap',
// 'resolve-url-loader',
// 'sass-loader?sourceMap'
// ]
// }]
// },
// plugins: [
// new webpack.HotModuleReplacementPlugin(),
// new webpack.NoEmitOnErrorsPlugin()
// ]
// };
//
// module.exports = devConfig;