0.38.8 broke absolute and aliased imports
See original GitHub issueUpgrade to 0.38.8 broke absolute and aliased imports. The code compiles and works fine, but shows errors in Volar:
tsconfig.json
:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
}
},
"include": [
"src/**/*.ts",
"src/**/*.vue",
],
}
webpack.js
:
const path = require("path")
module.exports = {
resolve: {
modules: ["node_modules", "src"],
extensions: [".ts", ".js"],
alias: {
"@": path.resolve(__dirname, "src"),
},
},
}
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Typescript cannot find module using @ root path syntax in ...
Open App.vue and change an import to use @/ root path syntax. E.g. import TheWelcome ... 0.38.8 broke absolute and aliased imports #1585....
Read more >Absolute Imports and Module Path Aliases
Configure module path aliases that allow you to remap certain import paths. ... a common pattern is aliasing certain directories to use absolute...
Read more >Resolve Absolute / Alias Imports in Components with ...
I'm using gatsby-plugin-alias-imports to be able to do absolute imports like so: import { colors } from "@styles/theme"; This is set up in ......
Read more >Avoiding the Fear of Refactoring With Absolute Imports in ...
Let's see how to use absolute path aliases to make your imports refactor-friendly in React. Avoiding relative paths and broken links while ...
Read more >Configuring Absolute Imports in React and React Native with ...
There are two great reasons to move to absolute imports. One is to avoid long relative paths, and the other is to make...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having the same issue as the post starter, I’m also on Windows, version 0.38.6 is the last version that works correctly for me.
Also running same issue with latest version on windows
Just to add a datapoint Problem happens for import links for .ts files inside of .vue files only
Example
Rolled back to 0.38.6