-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue declaration files endings -- .vue.d.ts
vs. .d.ts
#224
Comments
Could you check if |
I just wanted to let you know that I have basically the same setup and I tested your branch. A single dot is still remaining in the file name, e.g. |
Any progress on this? |
.vue.d.ts
instead of .d.ts
Wrote up a PR #336 to fix this, building on top of ezolenko's earlier branch and incorporating feedback from above on it. Just noting that the root cause here is that the |
Released in 0.32.0 |
@m4rvr Can you recall how you were importing your Vue components when you originally ran into this issue? i.e. were you doing As far as I can tell, this issue was only occurring if you were importing the component without the extension. But now that this plugin is stripping the |
@Mister-Hope @joakimbugge @dhruvkb @alexancheck would any of you be able to provide input or reproductions on the above? (all of you commented on or upvoted this issue)
Given the above and that If you believe it should be |
I can't find whatever project I was working on when I commented on this issue, but I did find another project from around that same time. In the project I'm importing components with file extension ( I don't think it ever hit me that the missing file extension was the culprit, but that probably was the reason for it not working. I was young and dumb and hated file extensions. It was a phase. This change should probably be reverted. |
In the project where I encountered this issue, I ended up not using |
@dhruvkb in the That seems to be what |
Yes |
.vue.d.ts
instead of .d.ts
.vue.d.ts
vs. .d.ts
So not everyone has responded unfortunately, but I think we have more than enough tie-breaking votes and evidence to go forward with reverting this. Will have a PR out for that shortly, though it may only release during the next breaking release. As an aside, note that this may very well be impacted by recent upstream issues with newer |
What happens and why it is wrong
Building works fine but the generated declaration file from a SFC for example
MyComponent.vue
is named asMyComponent.vue.d.ts
which breaks my imports (also generates like that without importing another SFC).Renaming the file to
MyComponent.d.ts
works and the errors are gone.Environment
I'm using this plugin together with
rollup-plugin-vue
androllup-plugin-babel
. I also have@rollup/plugin-commonjs
&@rollup/plugin-node-resolve
if that does matter.Could that be a configuration problem with my
tsconfig.json
? I will try to add the configs if needed.Versions
The text was updated successfully, but these errors were encountered: