-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwebpack.config.externals.js
55 lines (52 loc) · 1.21 KB
/
webpack.config.externals.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
44
45
46
47
48
49
50
51
52
53
54
55
/*********************************************************************
* Copyright (c) Intel Corporation 2020
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
const path = require('path') // No ES6 in webpack config
const webpack = require('webpack')
const coreConfig = {
mode: 'production',
entry: {
core: {
import: './src/core/index.ts',
library: {
name: 'ui-toolkit/core',
type: 'umd'
}
}
},
output: {
filename: '[name].bundle.js',
libraryTarget: 'umd',
path: path.resolve(__dirname, './dist/bundles')
},
optimization: {
concatenateModules: false
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: 'babel-loader',
options: {
plugins: [ ["transform-remove-console", { "exclude": [ "error", "warn"] }] ]
}
},
{
loader: 'ts-loader',
options: {
configFile: 'tsconfig.build.json'
}
}
],
exclude: /node_modules/,
},
]
},
resolve: {
extensions: ['.ts', '.js']
}
}
module.exports = coreConfig