From be63b401211b97115e590efb003b12de419aad25 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 25 Aug 2022 21:38:10 +0200 Subject: [PATCH] Fixed webpack resolve problems --- package.json | 1 + webpack.config.ts | 2 ++ yarn.lock | 11 ++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8250c86..1c57a5c 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "ts-loader": "^9.3.1", "ts-node": "^10.9.1", "tsconfig-paths": "^4.1.0", + "tsconfig-paths-webpack-plugin": "^4.0.0", "typescript": "^4.7.4", "webpack": "^5.74.0", "webpack-cli": "^4.10.0", diff --git a/webpack.config.ts b/webpack.config.ts index 398e3bf..6caad7e 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -1,6 +1,7 @@ import { DefinePlugin } from 'webpack'; import * as nodeExternals from 'webpack-node-externals'; import * as copyPlugin from 'copy-webpack-plugin'; +import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; import { resolve } from 'path'; import * as pkg from './package.json'; @@ -47,6 +48,7 @@ export default { externalsPresets: { node: true }, mode: 'production', resolve: { + plugins: [new TsconfigPathsPlugin()], extensions: ['.ts', '.js'] }, output: { diff --git a/yarn.lock b/yarn.lock index ba70dc5..0a228f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5544,6 +5544,15 @@ tsconfig-paths-webpack-plugin@3.5.2: enhanced-resolve "^5.7.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: version "3.14.1" 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" strip-bom "^3.0.0" -tsconfig-paths@^4.1.0: +tsconfig-paths@^4.0.0, tsconfig-paths@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.0.tgz#f8ef7d467f08ae3a695335bf1ece088c5538d2c1" integrity sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==