You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a vite plugin that modifies the logic how modules are resolved by the resolveId hook. For example, redirect the './config/index.ts' module request to './config/index.zh-cn.ts' if the latter one exists, to get the ability to dynamically switch between files at build time. It works but the drawback is everytime when i use VSCode's "jump to definition" to go to the definition of the module, i will be redirected to the './config/index.ts' file instead of the "zh-cn" version. So i decided to implement my own custom typescript plugin to achive that goal but it conflicts with Vue's LS.
Situation:
Everytime when Vue Official Extension enabled, my ts plugin can no longer be able to intercept the module requests to project files (non node_modules files) in my proxied version of languageServiceHost.resolveModuleNameLiterals. After disabling the Vue Official Extension, everything work again, but at the cost of losing the IDE support of vue SFC files.
Efforts made to solve this problem:
After several hours of searching, i end up with this closed issue that discussed about whether to support the vue.config.js feature like what Volar does before version 2.0, and finally decided to drop the support because the problem caused by wrong TS plugin loading order have beed resolved. It seems like the problem still exists.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Background:
I implemented a vite plugin that modifies the logic how modules are resolved by the
resolveId
hook. For example, redirect the './config/index.ts' module request to './config/index.zh-cn.ts' if the latter one exists, to get the ability to dynamically switch between files at build time. It works but the drawback is everytime when i use VSCode's "jump to definition" to go to the definition of the module, i will be redirected to the './config/index.ts' file instead of the "zh-cn" version. So i decided to implement my own custom typescript plugin to achive that goal but it conflicts with Vue's LS.Situation:
Everytime when Vue Official Extension enabled, my ts plugin can no longer be able to intercept the module requests to project files (non node_modules files) in my proxied version of languageServiceHost.resolveModuleNameLiterals. After disabling the Vue Official Extension, everything work again, but at the cost of losing the IDE support of vue SFC files.
Efforts made to solve this problem:
After several hours of searching, i end up with this closed issue that discussed about whether to support the vue.config.js feature like what Volar does before version 2.0, and finally decided to drop the support because the problem caused by wrong TS plugin loading order have beed resolved. It seems like the problem still exists.
Reproduction:
project link: https://github.com/dyf19118/ts-plugin-region-resolver
steps to reproduction:
Beta Was this translation helpful? Give feedback.
All reactions