Fix build issues

This commit is contained in:
schmelczerandras 2020-10-22 21:49:39 +02:00
parent dd21c20b3a
commit af616042f3
5 changed files with 21 additions and 12 deletions

View file

@ -11,6 +11,7 @@
"downlevelIteration": true,
"moduleResolution": "node",
"module": "commonjs",
"skipLibCheck": true,
"composite": true,
"lib": ["dom", "es2017"]
},

View file

@ -1,7 +1,4 @@
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
const TsConfigWebpackPlugin = require('ts-config-webpack-plugin');
const PATHS = {
entryPoint: path.resolve(__dirname, 'src/main.ts'),
@ -30,15 +27,18 @@ module.exports = (env, argv) => ({
optimization: {
minimize: false,
},
plugins: [
// Cleans the dist folder before the build starts
new CleanWebpackPlugin(),
// Generate a base html file and injects all generated css and js files
new HtmlWebpackPlugin(),
// Multi threading typescript loader configuration with caching for .ts and .tsx files
// see https://github.com/namics/webpack-config-plugins/tree/master/packages/ts-config-webpack-plugin/config
new TsConfigWebpackPlugin(),
],
plugins: [],
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
},
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts'],
},