chore(frontend): typescript configuration

This commit is contained in:
David Mosbach 2024-06-09 22:45:53 +00:00
parent 5a9ed747d2
commit 4cab9eafdf
5 changed files with 22 additions and 5 deletions

View File

@ -4,10 +4,11 @@
"useBuiltIns": "usage",
"targets": { "node": "current" }
}
]
],
["@babel/preset-typescript"]
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-decorators", { "legacy": true, "version": "2023-11" }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],

View File

@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2022 Felix Hamann <felix.hamann@campus.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
SPDX-FileCopyrightText: 2022-2024 Felix Hamann <felix.hamann@campus.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
SPDX-License-Identifier: AGPL-3.0-or-later

9
tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"outDir": "./frontend/src/js",
"module": "es6",
"target": "es5",
"allowJs": true,
"moduleResolution": "node"
}
}

3
tsconfig.json.license Normal file
View File

@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 David Mosbach <david.mosbach@uniworx.de>
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
// SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
@ -112,7 +112,7 @@ async function webpackConfig() {
entry: {
main: [ path.resolve(__dirname, 'frontend/src', 'polyfill.js'),
path.resolve(__dirname, 'frontend/src', 'main.js')
path.resolve(__dirname, 'frontend/src', 'main.ts')
]
},
@ -266,6 +266,10 @@ async function webpackConfig() {
})()
],
resolve: {
extensions: ['.js', '.ts', '.tsx']
},
output: {
chunkFilename: '[chunkhash].js',
filename: '[chunkhash].js',