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
"moduleResolution": "bundler", "allowImportingTsExtensions": true, These two configuration items have been like this In my memory for a long time.
When building a new vue project from vite, because the parsing strategy used is Bundler,there are always some problems like:
In 'tscofing.json' there are a few tips like this: 'Option '--resolveJsonModule' cannot be specified without the 'node' module resolution strategy.'.
There will also be a prompt in 'main.ts': `Cannot find module 'vue'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? '.
In order to solve this problem, we need to delete the tsconfig file "allowImportingTsExtensions": true; set the moduleResolution to "node", and leave it that way when they import file extension. So don't we need to make some changes here, so we don't have to revise all the time. (Although it's easy)
At the same time, I saw several popular component libraries that did the same thing:
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
-
"moduleResolution": "bundler", "allowImportingTsExtensions": true, These two configuration items have been like this In my memory for a long time.
When building a new vue project from vite, because the parsing strategy used is Bundler,there are always some problems like:
In order to solve this problem, we need to delete the tsconfig file "allowImportingTsExtensions": true; set the moduleResolution to "node", and leave it that way when they import file extension. So don't we need to make some changes here, so we don't have to revise all the time. (Although it's easy)
At the same time, I saw several popular component libraries that did the same thing:
Beta Was this translation helpful? Give feedback.
All reactions