-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathwebpack.config.js
More file actions
34 lines (31 loc) · 882 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
34 lines (31 loc) · 882 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
const path = require('path');
const plugins = require('./webpack/plugins');
const entries = require('./webpack/entries');
const resolve = require('./webpack/resolve');
const proxies = require('./webpack/proxies');
const mod = require('./webpack/module');
const exercises = require('./webpack/exercises');
module.exports = function webpackConfig(env) {
const EXERCISE_PATH = exercises.exercisePath(env);
return {
entry: entries(env),
context: EXERCISE_PATH,
devtool: 'source-maps',
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/assets/'
},
devServer: {
publicPath: '/assets/',
contentBase: EXERCISE_PATH,
overlay: true,
proxy: proxies(env),
port: 3000
},
plugins: plugins(env),
module: mod(env),
resolve: resolve(env)
};
};