-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.js
41 lines (36 loc) · 1.04 KB
/
webpack.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
const path = require('path');
function baseUrl(subdir) {
return path.join(__dirname, ".", subdir);
}
const config = {
entry: './site/public/ts/fss/Main.ts',
output: {
filename: 'Bundle.js',
path: path.resolve(__dirname, 'build')
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.(ts)$/,
exclude: /(node_modules)/,
use: {
loader: 'ts-loader',
options: {onlyCompileBundledFiles: true}
}
}
]
},
resolve: {
alias: {
"Vector": baseUrl('lib/OpenCircuits/app/core/ts/utils/math/Vector'),
"math": baseUrl('lib/OpenCircuits/app/core/ts/utils/math'),
"core": baseUrl('lib/OpenCircuits/app/core/ts/'),
"fss": baseUrl('app/fss/ts/'),
"site/shared": baseUrl('lib/OpenCircuits/site/public/ts/shared'),
"site/fss": baseUrl('site/public/ts/fss')
},
extensions: ['.ts', '.js']
}
};
module.exports = config;