-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: use vue-tsc
generate vue declarations
#154
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
+ Coverage 81.73% 83.05% +1.32%
==========================================
Files 11 12 +1
Lines 761 850 +89
Branches 120 133 +13
==========================================
+ Hits 622 706 +84
- Misses 137 142 +5
Partials 2 2 ☔ View full report in Codecov by Sentry. |
@danielroe Thank you for fixed lint, Sorry, I didn't notice that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ideally I would like to refactor this to be a separate 'vue-dts' loader. But I think we can probably merge and iterate later. wdyt @pi0?
Would be great to get this merged! |
Thoughts @pi0? |
vue-tsc
generate .d.ts
files for .vue
sources
vue-tsc
generate .d.ts
files for .vue
sourcesvue-tsc
generate vue declarations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi again thanks for this PR and sorry for checking late. I like the general idea and the implementation but checking with current status and pnpm dev
to run on fixture, it generates additional files inside src
+ empty ones in dist. We mighe need to check why tsHost is possibly not being passed.
Also would be nice if we have a fallback strategy to use ts loader if vue-tsc
is not installed (maybe with a warn to guide to add)
Standalone loader would be a nice idea! |
Hi @pi0, based on my research, |
# Conflicts: # src/make.ts
getSfcMapping -> getFileMapping
@pi0 Hi again, It's been a month, could you please let me know when we can expect this to be merged? |
Any update for this🥺? |
If it is important, feel free to make a new PR to rework 👍🏼 (we need to fix the correct dist output) |
@pi0 Using the latest vue-tsc version 1.8.22 is not working. I found that rewriting ts.sys and the ts.sys used inside vue-tsc are different. I am currently looking for a way to fix this issue. |
Hi @pi0, Inside vue-tsc, Please check that again, Thanks ! |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi everyone, I'm not sure why the review has been pause. However, since I urgently need this feature, I have independently released If you need this functionality like I do, below are a few ways to use: Using alias in package.json: // package.json
{
"devDependencies": {
"mkdist": "npm:@aa900031/mkdist@^1.5.0"
}
} If you use // package.json
{
"devDependencies": {
"unbuild": "^2.0.0"
},
"pnpm": {
"overrides": {
"unbuild>mkdist": "npm:@aa900031/mkdist@^1.5.0"
}
}
} |
Thanks and sorry for dalay on merge (other than review process, I'm really busy on many project so have to perorotize). |
It's ok, I know you have many projects, Thank you so much 🙇 |
Use vue-tsc to generate d.ts for Vue SFC
Reference: #22