-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
Possibility to support vue-loader? #270
Comments
I forked ts-loader for this. But it seems ts-loader changes quite fast. Any possibility to support vue natively in ts-loader? |
Quite possibly. I'm just doing a bit of a refactor on the code to get it to a more maintainable place. I'd be interested in getting vue support in once that's done. (I'm currently guessing I'll be done with the refactor inside a week or 2). Does adding
Forgive me if that's a naïve question; I have 0 vue experience.... |
It still need some special handling in loader, but rather small modification. HerringtonDarkholme/vue-ts-loader@d581d46 The core modification is appending |
I'm on my phone and so can't really look at this properly. But I think we can avoid hard coding and just add another option. As I see it
Is something that tests a file path ends with |
That's great. More generic. 👍 |
Great - we'll need an integration test to cover this. You may already have one we can use. We've recently introduced "execution tests" as well as the pre-existing "comparison tests". Either will do. The comparison tests only run against the latest released version of TypeScript. The execution tests against all versions back to 1.6. |
I will submit a pull request once refactor is done. Looking forward to your refactor :) |
Cool! The refactor is basically done. Just waiting on some feedback. Will let you know when I merge 😄 |
Over to you... 1.0.0 has 🚢 😄 |
Thanks! I need some time to understand what ts-loader does now, so please be patient. |
No worries - I need that too! |
Is there any flaky test? vue-loader's output is indeed very flaky... |
There are flaky tests in the comparison test pack. Look out for a |
[RFC] fix #270, support `appendTsSuffixTo` config
Thanks for building ts-loader for webpack! I wonder whether ts-loader can support vue.js' single file component.
Related issue in vue-loader
vuejs/vue-loader#109
The current problem is ts-loader cannot resolve files with extension name
.vue
. However, TypeScript compiler supports customizing module resolution.Since ts-loader has already implemented a custom
resolveModuleNames
function, supporting it is feasible.I tried locally and it works. However I'm a newbie to webpack and I think my try is dirty and hacky...
Do you have any good ideas? I'm happy to implement them.
The text was updated successfully, but these errors were encountered: