-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathwebpack.config.js
More file actions
30 lines (29 loc) · 838 Bytes
/
webpack.config.js
File metadata and controls
30 lines (29 loc) · 838 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
const path = require('path');
const webpack = require('webpack');
const slash = require('slash');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const AddAssetHtmlPlugin = require('../..');
module.exports = {
// Normally CWD
context: __dirname,
entry: path.join(__dirname, 'entry.js'),
devtool: 'source-map',
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: 'index_bundle.js',
publicPath: '',
},
plugins: [
new webpack.DllReferencePlugin({
context: __dirname,
// eslint-disable-next-line global-require
manifest: require('./build/vendor-manifest.json'),
}),
new HtmlWebpackPlugin(),
new AddAssetHtmlPlugin({
// glob needs to use forward slashes
glob: `${slash(path.resolve(__dirname, './build'))}/*.dll.js`,
}),
],
};