Fixed webpack resolve problems

This commit is contained in:
Mutzi 2022-08-25 21:38:10 +02:00
parent eb95d308f9
commit be63b40121
3 changed files with 13 additions and 1 deletions

View File

@ -92,6 +92,7 @@
"ts-loader": "^9.3.1", "ts-loader": "^9.3.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.0", "tsconfig-paths": "^4.1.0",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"webpack": "^5.74.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",

View File

@ -1,6 +1,7 @@
import { DefinePlugin } from 'webpack'; import { DefinePlugin } from 'webpack';
import * as nodeExternals from 'webpack-node-externals'; import * as nodeExternals from 'webpack-node-externals';
import * as copyPlugin from 'copy-webpack-plugin'; import * as copyPlugin from 'copy-webpack-plugin';
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
import { resolve } from 'path'; import { resolve } from 'path';
import * as pkg from './package.json'; import * as pkg from './package.json';
@ -47,6 +48,7 @@ export default {
externalsPresets: { node: true }, externalsPresets: { node: true },
mode: 'production', mode: 'production',
resolve: { resolve: {
plugins: [new TsconfigPathsPlugin()],
extensions: ['.ts', '.js'] extensions: ['.ts', '.js']
}, },
output: { output: {

View File

@ -5544,6 +5544,15 @@ tsconfig-paths-webpack-plugin@3.5.2:
enhanced-resolve "^5.7.0" enhanced-resolve "^5.7.0"
tsconfig-paths "^3.9.0" tsconfig-paths "^3.9.0"
tsconfig-paths-webpack-plugin@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.0.0.tgz#84008fc3e3e0658fdb0262758b07b4da6265ff1a"
integrity sha512-fw/7265mIWukrSHd0i+wSwx64kYUSAKPfxRDksjKIYTxSAp9W9/xcZVBF4Kl0eqQd5eBpAQ/oQrc5RyM/0c1GQ==
dependencies:
chalk "^4.1.0"
enhanced-resolve "^5.7.0"
tsconfig-paths "^4.0.0"
tsconfig-paths@3.14.1, tsconfig-paths@^3.9.0: tsconfig-paths@3.14.1, tsconfig-paths@^3.9.0:
version "3.14.1" version "3.14.1"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"
@ -5554,7 +5563,7 @@ tsconfig-paths@3.14.1, tsconfig-paths@^3.9.0:
minimist "^1.2.6" minimist "^1.2.6"
strip-bom "^3.0.0" strip-bom "^3.0.0"
tsconfig-paths@^4.1.0: tsconfig-paths@^4.0.0, tsconfig-paths@^4.1.0:
version "4.1.0" version "4.1.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1"
integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow== integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==