-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwebpack.skyflow-browser.js
More file actions
41 lines (38 loc) · 986 Bytes
/
webpack.skyflow-browser.js
File metadata and controls
41 lines (38 loc) · 986 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
37
38
39
40
41
/*
Copyright (c) 2022 Skyflow, Inc.
*/
const { merge } = require('webpack-merge');
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const terserWebpackPlugin = require('terser-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const common = require('./webpack.common.js');
module.exports = () => merge(common, {
mode: 'production',
entry: {
index: [ path.resolve(__dirname, 'src/index.ts')],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist/v1'),
},
optimization: {
// splitChunks: {
// chunks: "all",
// },
runtimeChunk: false,
minimizer: [new terserWebpackPlugin()],
},
module: {
rules: [],
},
plugins: [
new CleanWebpackPlugin({
verbose: true,
dry: false,
}),
new WebpackManifestPlugin(),
new CompressionPlugin(),
],
});