Do tsconfig and webpack

This commit is contained in:
Tamius Han 2021-02-08 20:55:17 +01:00
parent 4d1da636e3
commit 3b79829b72
2 changed files with 16 additions and 5 deletions

8
tsconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"outDir": "./ts-out",
"allowJs": true,
"target": "es2020"
},
"include": [ "./src/**/*" ]
}

View File

@ -22,19 +22,22 @@ const config = {
path: __dirname + `/dist-${process.env.BROWSER == 'firefox' ? 'ff' : process.env.BROWSER}`,
filename: '[name].js',
},
devtool: "source-map",
resolve: {
// maybe we'll move to TS some day, but today is not the day
extensions: [
// '.ts', '.tsx',
'.ts', '.tsx',
'.js', '.vue'
],
},
module: {
rules: [
// {
// test: /\.tsx?$/,
// loader: 'ts-loader',
// },
{
test: /\.tsx?$/,
loader: 'ts-loader',
},
{
test: /\.vue$/,
loaders: 'vue-loader',