Fix mismatching function names

This commit is contained in:
schmelczerandras 2020-10-22 16:58:10 +02:00
parent f1a2131540
commit 6694e353ad
4 changed files with 30 additions and 15 deletions

View file

@ -6,7 +6,7 @@
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
"main": "dist/main.js",
"bin": {
"declared-server": "dist/main.js"
"declared-server": "./dist/main.js"
},
"scripts": {
"build": "npx webpack --mode production",
@ -39,16 +39,18 @@
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-unused-imports": "^0.1.3",
"file-loader": "^6.1.0",
"html-webpack-plugin": "^4.5.0",
"nodemon": "^2.0.4",
"prettier": "^2.0.5",
"raw-loader": "^4.0.1",
"resolve-url-loader": "^3.1.1",
"terser-webpack-plugin": "^2.3.5",
"ts-config-webpack-plugin": "^2.0.0",
"ts-loader": "^8.0.3",
"typescript": "^4.0.3",
"webpack": "^4.43.0",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.10.3",
"webpack-dev-server": "^3.11.0",
"webpack-node-externals": "^2.5.2"
}
}

View file

@ -40,6 +40,7 @@
"sdf-2d": "^0.6.0",
"socket.io-client": "^2.3.1",
"source-map-loader": "^1.1.1",
"terser-webpack-plugin": "^4.2.2",
"ts-config-webpack-plugin": "^2.0.0",
"typescript": "^4.0.3",
"webpack": "^4.43.0",

View file

@ -3,6 +3,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');
const TsConfigWebpackPlugin = require('ts-config-webpack-plugin');
const HtmlWebpackInlineSVGPlugin = require('html-webpack-inline-svg-plugin');
const TerserJSPlugin = require('terser-webpack-plugin');
module.exports = {
devServer: {
@ -34,6 +35,17 @@ module.exports = {
// see https://github.com/namics/webpack-config-plugins/tree/master/packages/ts-config-webpack-plugin/config
new TsConfigWebpackPlugin(),
],
optimization: {
minimizer: [
new TerserJSPlugin({
test: /\.js$/,
exclude: /node_modules/,
terserOptions: {
keep_classnames: true,
},
}),
],
},
module: {
rules: [
{

View file

@ -1,4 +1,7 @@
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'),
@ -27,18 +30,15 @@ module.exports = (env, argv) => ({
optimization: {
minimize: false,
},
plugins: [],
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
},
exclude: /node_modules/,
},
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(),
],
},
resolve: {
extensions: ['.ts'],
},