]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commit
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)
commitf0e47a666549fe30517b4c4cca81c3cb0e6c7d2e
tree159025e3bf8c81b542f117ff859a57f1ceda1fa5
parent3bd97737f8b0d4de4e31d0e89e02b540c733b0a6
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.
template/tsconfig/base/tsconfig.node.json