-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (41 loc) · 1.06 KB
/
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
38
39
40
41
42
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const Dotenv = require('dotenv-webpack');
module.exports = [{
mode: 'production',
entry: {
index: './client/index-on.js',
},
plugins: [
new CleanWebpackPlugin(),
new Dotenv(),
new HtmlWebpackPlugin({
title: 'Split RUM Agent example: async loading & production mode',
template: './client/index.html'
}),
],
output: {
filename: '[name].bundle-on.js',
chunkFilename: '[name].bundle-on.js',
path: path.resolve(__dirname, 'dist', 'on')
},
}, {
mode: 'development',
entry: {
index: './client/index-off.js',
},
plugins: [
new CleanWebpackPlugin(),
new Dotenv(),
new HtmlWebpackPlugin({
title: 'Split RUM Agent example: sync loading & development mode',
template: './client/index.html'
}),
],
output: {
filename: '[name].bundle-off.js',
chunkFilename: '[name].bundle-off.js',
path: path.resolve(__dirname, 'dist', 'off')
},
}];