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
? Project name vue-ts-bug
? Project description A Vue.js project
? Author <snip>
? Vue build standalone
? Use TypeScript as default language? Yes
? Install vue-router? Yes
? Use ESLint to lint your code? No
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm
In VSCode, File -> Open Folder -> [Select vue-ts-bug folder]
Create and save:
src/apple.ts
export const Apple = "Apple";
Edit and save:
src/components/HelloWorld.vue
<script lang="ts">
import Vue from 'vue'
import { Apple } from "../apple";
<snip>
Edit and save:
src/apple.ts
export const Apple2 = "Apple";
Edit and save:
src/components/HelloWorld.vue
<script lang="ts">
import Vue from 'vue'
import { Apple2 } from "../apple";
<snip>
Expected to see:
No errors
Instead saw:
VSCode marks this line:
import { Apple2 } from "../apple";
as having the error:
Module '"c:/path-to-vue-ts-bug/src/apple` has no exported member 'Apple2'"
Restarting VSCode causes VSCode to pick up the changes from apple.ts, i.e. error goes away. Making further changes to apple.ts (e.g. renaming Apple2 back to Apple) will cause the error to occur again.
Filing an issue here as this doesn't occur when apple.ts is imported from another .ts file. e.g. if the following line is added to index.ts:
import { Apple2 } from './apple';
VSCode detects changes made to apple.ts and works as expected.
The issue is purely cosmetic, i.e. even if VSCode marks the import statement as an error, the compiled code works properly (assuming the apple.ts export is consistent with the import of course). However, until VSCode is restarted, you lose all auto-completion for the changes VSCode doesn't know about.
Apologies if this is not an error with Vetur and should be filed somewhere else.
The text was updated successfully, but these errors were encountered:
Info
Problem
Error message from Panel -> Output -> Vue Language Server:
None. I just see:
vetur initialized
Reproducible Case
With the following options:
In VSCode, File -> Open Folder -> [Select vue-ts-bug folder]
Create and save:
src/apple.ts
src/components/HelloWorld.vue
src/apple.ts
src/components/HelloWorld.vue
Expected to see:
No errors
Instead saw:
VSCode marks this line:
as having the error:
Module '"c:/path-to-vue-ts-bug/src/apple` has no exported member 'Apple2'"
Restarting VSCode causes VSCode to pick up the changes from apple.ts, i.e. error goes away. Making further changes to apple.ts (e.g. renaming Apple2 back to Apple) will cause the error to occur again.
Filing an issue here as this doesn't occur when apple.ts is imported from another .ts file. e.g. if the following line is added to index.ts:
VSCode detects changes made to apple.ts and works as expected.
The issue is purely cosmetic, i.e. even if VSCode marks the import statement as an error, the compiled code works properly (assuming the apple.ts export is consistent with the import of course). However, until VSCode is restarted, you lose all auto-completion for the changes VSCode doesn't know about.
Apologies if this is not an error with Vetur and should be filed somewhere else.
The text was updated successfully, but these errors were encountered: