forked from pburtchaell/react-notification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.local.config.js
53 lines (52 loc) · 1.37 KB
/
webpack.local.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
46
47
48
49
50
51
52
53
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
/**
* This is the Webpack configuration file for local development and testing.
* Since the HTML WebPack plugin is used, no files are actually generated;
* everything is handled by the development server.
* It contains local-specific configuration including:
* - The entry point of the application
* - Where the output file should be
* - Which loaders to use on what files to properly transpile the source
* For more information, see: http://webpack.github.io/docs/configuration.html
*/
module.exports = {
devtool: 'inline-source-map',
entry: {
app: [
'webpack-dev-server/client?//',
'webpack/hot/only-dev-server',
'./examples/es2015/index',
]
},
output: {
publicPath: '/',
path: path.join(__dirname, '/'),
filename: '[name].js',
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin(),
],
resolve: {
modulesDirectories: ['node_modules', 'src']
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel?stage=0'],
}
]
},
devServer: {
quiet: true,
hot: true,
inline: true,
}
};