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
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 vue to your webpack.config not resolve the issue?:
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
function appendSuffixToVue(fileName: string) {
if (/\.vue$/.test(fileName)) {
return fileName + '.ts';
}
return fileName;
}
Is something that tests a file path ends with vue and if so suffixes .ts on the end. So what say we introduce a ts-loader option called appendTsSuffixTo that, when supplied, is used to suffix .ts in the manner your fork does. Sound good?
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.
There are flaky tests in the comparison test pack. Look out for a _FLAKY_ file in the root of test directories. This denotes a flaky test and a failure of this will not fail the build. I think there's about 3 flaky tests; mainly down to platform issues. See this as an example of a flaky test:
Activity
HerringtonDarkholme commentedon Oct 24, 2016
I forked ts-loader for this. But it seems ts-loader changes quite fast. Any possibility to support vue natively in ts-loader?
johnnyreilly commentedon Oct 24, 2016
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
vueto your webpack.config not resolve the issue?:Forgive me if that's a naïve question; I have 0 vue experience....
HerringtonDarkholme commentedon Oct 24, 2016
It still need some special handling in loader, but rather small modification.
HerringtonDarkholme/vue-ts-loader@d581d46
The core modification is appending
.tssuffix to*.vuefile, then every thing is fine. My concern is its hard coding nature.johnnyreilly commentedon Oct 24, 2016
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
vueand if so suffixes.tson the end. So what say we introduce a ts-loader option calledappendTsSuffixTothat, when supplied, is used to suffix.tsin the manner your fork does. Sound good?HerringtonDarkholme commentedon Oct 24, 2016
That's great. More generic. 👍
johnnyreilly commentedon Oct 24, 2016
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.
HerringtonDarkholme commentedon Oct 29, 2016
I will submit a pull request once refactor is done. Looking forward to your refactor :)
johnnyreilly commentedon Oct 29, 2016
Cool! The refactor is basically done. Just waiting on some feedback. Will let you know when I merge 😄
johnnyreilly commentedon Oct 29, 2016
#343
johnnyreilly commentedon Nov 1, 2016
Over to you... 1.0.0 has 🚢 😄
HerringtonDarkholme commentedon Nov 2, 2016
Thanks! I need some time to understand what ts-loader does now, so please be patient.
johnnyreilly commentedon Nov 2, 2016
No worries - I need that too!
HerringtonDarkholme commentedon Nov 2, 2016
Is there any flaky test? vue-loader's output is indeed very flaky...
johnnyreilly commentedon Nov 2, 2016
There are flaky tests in the comparison test pack. Look out for a
_FLAKY_file in the root of test directories. This denotes a flaky test and a failure of this will not fail the build. I think there's about 3 flaky tests; mainly down to platform issues. See this as an example of a flaky test:https://github.com/TypeStrong/ts-loader/tree/master/test/comparison-tests/html-webpack-plugin
Merge pull request #354 from HerringtonDarkholme/dev