-
-
Notifications
You must be signed in to change notification settings - Fork 431
/
webpack.config.js
40 lines (37 loc) · 1.15 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
var path = require('path')
var uppercaseStringLiteralTransformer = require('./uppercaseStringLiteralTransformer').default;
module.exports = {
mode: 'development',
entry: './src/app.ts',
output: {
filename: 'bundle.js'
},
resolve: {
alias: { externalLib: path.join(__dirname, "./lib/externalLib.js") },
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /submodule3\.ts$/,
loader: 'ts-loader',
},
{
test: /submodule2\.ts$/,
loader: 'ts-loader',
options: {
getCustomTransformers: (program) => ({
before: [uppercaseStringLiteralTransformer]
})
},
},
{
test: /\.ts$/,
exclude: /submodule\d\.ts$/,
loader: 'ts-loader',
}
]
}
}
// for test harness purposes only, you would not need this in a normal project
module.exports.resolveLoader = { alias: { 'ts-loader': require('path').join(__dirname, "../../../index.js") } }