-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.prod.js
43 lines (40 loc) · 1.08 KB
/
webpack.config.prod.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
43
/*********************************************************************
* Copyright (c) Intel Corporation 2020
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
const path = require('path') // No ES6 in webpack config
const webpack = require('webpack')
module.exports = {
mode: 'production',
entry: {
kvm: './src/reactjs/KVM/index.tsx',
sol: './src/reactjs/SerialOverLAN/index.tsx',
ider: './src/reactjs/IDER/index.tsx',
},
// sourceMap in tsconfig which holds information about your original files when the code is minified
// devtool deal with existing source maps
devtool: 'inline-source-map',
output: {
filename: '[name].min.js',
path: path.resolve(__dirname, './dist'),
library: {
name: 'ui-toolkit',
type: 'umd'
}
},
module: {
rules: [
{
test: /\.tsx?$/,
use: ['ts-loader']
},
{
test: /\.(sc|sa|c)ss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
}
}