-
Notifications
You must be signed in to change notification settings - Fork 13
/
webpack.config.js
75 lines (74 loc) · 2.21 KB
/
webpack.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
75
const glob = require('glob')
const path = require('path')
const keysTransformer = require('ts-transformer-keys/transformer').default
module.exports = {
mode: 'production',
entry: {
angular: glob.sync(
'./packages/angular/src/**/*.ts',
{
ignore: [
'./packages/**/src/**/typings.d.ts',
'./packages/angular/src/test/**/*.ts',
'./packages/angular/src/quill-plugins/*.ts',
'./packages/angular/src/boot.ts'
]
}
),
angularjs: glob.sync('./packages/angularjs/src/**/*.ts'),
// This package is mixed with JavaScript / TypeScript, so the bundle only has the JavaScript at this time
'angularjs-extras': glob.sync('./packages/angularjs-extras/src/**/*.ts'),
// This package is not in use yet
// backend: glob.sync('./packages/backend/src/**/*.ts'),
// The boot package is Native JavaScript
// boot: glob.sync('./packages/boot/src/**/*.ts'),
calendar: glob.sync('./packages/calendar/src/**/*.ts'),
core: glob.sync('./packages/core/src/**/*.ts'),
idx: glob.sync('./packages/idx/src/**/*.ts'),
map: glob.sync('./packages/map/src/**/*.ts'),
// React isn't set up
// react: glob.sync('./packages/react/src/**/*.ts'),
// Runtime has complex requires
// runtime: glob.sync('./packages/runtime/src/**/*.ts'),
stripe: glob.sync('./packages/stripe/src/**/*.ts'),
swiper: glob.sync('./packages/swiper/src/**/*.ts')
},
// entry: {
// boot: './packages/angular/src/boot.ts',
// main: './packages/angular/src/main.ts',
// },
output: {
path: path.resolve(__dirname, 'packages'),
filename: '[name]/dist/[name].bundle.js'
// libraryTarget: 'system'
},
plugins: [],
module: {
rules: [
// {
// parser: {
// system: false
// }
// },
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
getCustomTransformers: program => ({
before: [
keysTransformer(program)
]
})
}
},
{
test: /\.(s(a|c)ss)$/,
use: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
resolve: {
extensions: ['.ts']
}
}