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