-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (33 loc) · 1.03 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
const path = require('path');
//BEGIN CODE FROM https://stackoverflow.com/questions/40426378/webpack-ts-loader-change-tsconfig-filename
let rfile = path.resolve(__dirname, "tspublic", "index.tsx");
let outdir = path.resolve(__dirname, "public");
//END CODE FROM https://stackoverflow.com/questions/40426378/webpack-ts-loader-change-tsconfig-filename
//BEGIN CODE FROM https://stackoverflow.com/questions/40426378/webpack-ts-loader-change-tsconfig-filename
module.exports = {
entry: [rfile],
mode: 'production',
watch: false,
module: {
rules: [
{
test: /\.tsx?$/,
use: [{
loader: 'ts-loader',
options: {
configFile: "tsconfig_public.json"
}
}],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [ '.ts', '.js', '.tsx', '.jsx' ],
},
output: {
filename: 'bundle.js',
path: outdir,
},
};
//END CODE FROM https://stackoverflow.com/questions/40426378/webpack-ts-loader-change-tsconfig-filename