-
Notifications
You must be signed in to change notification settings - Fork 195
/
webpack.config.js
37 lines (36 loc) · 971 Bytes
/
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
const { resolve } = require('path');
const webpack = require('webpack');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:3000',
'./index.js'
],
output: {
filename: 'bundle.js',
path: resolve(__dirname, 'dist'),
publicPath: '/'
},
context: resolve(__dirname, 'src'),
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.js|.jsx?$/,
use: [ 'babel-loader' ],
exclude: /node_modules/
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: [ 'file-loader?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack-loader?bypassOnDebug' ]
}
]
},
plugins: [
new webpack.NamedModulesPlugin()
]
};