]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: set moduleResolution: Bundler in tsconfig.node.json
authorHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 24 Jul 2023 09:52:55 +0000 (17:52 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 24 Jul 2023 10:00:52 +0000 (18:00 +0800)
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.

template/tsconfig/base/tsconfig.node.json

index bb67dfcb6897e55e00075d9aa74b8b39f1a99f13..dee96bed470be6dbaa5b6ae0748ae883ee3db0d6 100644 (file)
@@ -10,6 +10,7 @@
   "compilerOptions": {
     "composite": true,
     "module": "ESNext",
+    "moduleResolution": "Bundler",
     "types": ["node"]
   }
 }