-
Notifications
You must be signed in to change notification settings - Fork 8
/
webpack.skyflow-node.js
41 lines (40 loc) · 1.04 KB
/
webpack.skyflow-node.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
/*
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-node.ts')],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist/sdkNodeBuild'),
library: 'Skyflow',
libraryTarget: 'umd',
globalObject: 'this',
umdNamedDefine: true,
publicPath: '',
},
optimization: {
runtimeChunk: false,
minimizer: [new terserWebpackPlugin()],
},
module: {
rules: [],
},
plugins: [
new CleanWebpackPlugin({
verbose: true,
dry: false,
}),
new WebpackManifestPlugin(),
new CompressionPlugin(),
],
});