-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
36 lines (32 loc) · 799 Bytes
/
webpack.config.js
File metadata and controls
36 lines (32 loc) · 799 Bytes
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
const path = require('path');
const config = require('./config/server');
const webpackConfig = {
devtool: config.devtool,
devServer: config.devServer || {},
entry: ['babel-polyfill', 'universal-fetch', './src/client/index.js'],
output: {
path: path.join(__dirname, '/build'),
filename: 'bundle.js',
publicPath: '/build/'
},
plugins: [],
module: {
rules: [
{
test: /\.(js|jsx)$/,
loaders: ['babel-loader?cacheDirectory'],
exclude: /node_modules/,
},
{
test: /\.css$/,
exclude: /node_modules/,
loaders: ['style-loader', 'css-loader'],
},
{
test: /\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file?name=public/[name].[ext]',
},
],
},
};
module.exports = webpackConfig;