forked from vmware-archive/clarity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.icons.config.js
74 lines (72 loc) · 2.89 KB
/
webpack.icons.config.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Copyright (c) 2016-2018 VMware, Inc. All Rights Reserved.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
index: './src/clr-icons/index.ts',
'interfaces/icon-interfaces': './src/clr-icons/interfaces/icon-interfaces.ts',
'utils/descriptor-config': './src/clr-icons/utils/descriptor-config.ts',
'clr-icons-api': './src/clr-icons/clr-icons-api.ts',
'clr-icons-element': './src/clr-icons/clr-icons-element.ts',
'clr-icons-lite.min': './src/clr-icons/index.ts',
'clr-icons.min': './src/clr-icons/clr-icons-sfx.ts',
'shapes/all-shapes': './src/clr-icons/shapes/all-shapes.ts',
'shapes/all-shapes.min': './src/clr-icons/shapes/all-shapes.ts',
'shapes/commerce-shapes': './src/clr-icons/shapes/commerce-shapes.ts',
'shapes/commerce-shapes.min': './src/clr-icons/shapes/commerce-shapes.ts',
'shapes/core-shapes': './src/clr-icons/shapes/core-shapes.ts',
'shapes/core-shapes.min': './src/clr-icons/shapes/core-shapes.ts',
'shapes/essential-shapes': './src/clr-icons/shapes/essential-shapes.ts',
'shapes/essential-shapes.min': './src/clr-icons/shapes/essential-shapes.ts',
'shapes/media-shapes': './src/clr-icons/shapes/media-shapes.ts',
'shapes/media-shapes.min': './src/clr-icons/shapes/media-shapes.ts',
'shapes/social-shapes': './src/clr-icons/shapes/social-shapes.ts',
'shapes/social-shapes.min': './src/clr-icons/shapes/social-shapes.ts',
'shapes/travel-shapes': './src/clr-icons/shapes/travel-shapes.ts',
'shapes/travel-shapes.min': './src/clr-icons/shapes/travel-shapes.ts',
'shapes/technology-shapes': './src/clr-icons/shapes/technology-shapes.ts',
'shapes/technology-shapes.min': './src/clr-icons/shapes/technology-shapes.ts',
'shapes/chart-shapes': './src/clr-icons/shapes/chart-shapes.ts',
'shapes/chart-shapes.min': './src/clr-icons/shapes/chart-shapes.ts',
'shapes/text-edit-shapes': './src/clr-icons/shapes/text-edit-shapes.ts',
'shapes/text-edit-shapes.min': './src/clr-icons/shapes/text-edit-shapes.ts',
},
output: {
path: path.resolve(__dirname, 'dist/clr-icons'),
filename: '[name].js',
libraryTarget: 'umd',
globalObject: 'this',
},
target: 'web',
resolve: {
modules: ['./node_modules'],
extensions: ['.ts', '.ts', '.js'],
},
devtool: 'source-map',
plugins: [
new UglifyJsPlugin({
include: /\.min\.js$/,
}),
],
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
loaders: [
{
loader: 'awesome-typescript-loader',
options: {
configFileName: 'src/clr-icons/tsconfig.icons.json',
},
},
],
},
],
},
};