From: Haoqun Jiang Date: Mon, 24 Jul 2023 09:52:55 +0000 (+0800) Subject: fix: set moduleResolution: Bundler in tsconfig.node.json X-Git-Tag: v3.7.2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0e47a666549fe30517b4c4cca81c3cb0e6c7d2e;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: set moduleResolution: Bundler in tsconfig.node.json It was `moduleResolution: "node"` in `@tsconfig/node18` v2, but later changed to `node16` in v18. This is a breaking change, and not suitable for our use cases. We use the Node.js tsconfig for configuration files, most of which expect either `moduleResolution: "node"` or `moduleResolution: "bundler"` (e.g. Vite, which has its own bundling logic for configuration file). So in the commit, I'm setting it to `moduleResolution: "bundler"`. I haven't seen any regressions myself, but if there are any, we can revert to `moduleResolution: "node"`. `node16` is obviously not compatible with many tools at the moment. --- diff --git a/template/tsconfig/base/tsconfig.node.json b/template/tsconfig/base/tsconfig.node.json index bb67dfcb..dee96bed 100644 --- a/template/tsconfig/base/tsconfig.node.json +++ b/template/tsconfig/base/tsconfig.node.json @@ -10,6 +10,7 @@ "compilerOptions": { "composite": true, "module": "ESNext", + "moduleResolution": "Bundler", "types": ["node"] } }