-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
28 lines (27 loc) · 755 Bytes
/
webpack.config.js
File metadata and controls
28 lines (27 loc) · 755 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
const path = require('node:path');
const EnsureOrderForTreeShakingPlugin = require('./plugins/EnsureOrderForTreeShakingPlugin.js');
const WrongOrderForTreeShakingPlugin = require('./plugins/WrongOrderForTreeShakingPlugin.js');
module.exports = [
{
mode: 'production',
entry: { app: ['./app/index.js'] },
output: {
path: path.resolve(__dirname, './build/correct'),
},
optimization: {
minimizer: [],
},
plugins: [new EnsureOrderForTreeShakingPlugin()],
},
{
mode: 'production',
entry: { app: ['./app/index.js'] },
output: {
path: path.resolve(__dirname, './build/incorrect'),
},
optimization: {
minimizer: [],
},
plugins: [new WrongOrderForTreeShakingPlugin()],
},
];