1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

build: typescript config

This commit is contained in:
2022-04-12 17:04:11 +02:00
parent 96d6913a7a
commit 3975359292
4 changed files with 58 additions and 4 deletions

View File

@ -13,7 +13,7 @@ module.exports = { // Main
mode: process.env.NODE_ENV,
devtool: isDevMode ? 'eval-source-map' : false,
entry: {
main: path.join(__dirname, './src/main/main.js')
main: path.join(__dirname, './src/main/main.ts')
},
target: 'electron-main',
output: {
@ -28,7 +28,7 @@ module.exports = { // Main
},
externals: externals.filter((d) => !whiteListedModules.includes(d)),
resolve: {
extensions: ['.js', '.json'],
extensions: ['.js', '.json', '.ts'],
alias: {
src: path.join(__dirname, 'src/'),
common: path.resolve(__dirname, 'src/common')
@ -56,6 +56,11 @@ module.exports = { // Main
name: '[path][name].[ext]'
}
},
{
test: /\.ts$/,
exclude: /node_modules/,
loader: 'ts-loader'
},
{
test: /\.js$/,
exclude: /node_modules/,