The template depends on bundling your code, even during development. That's also required to do HMR actually.
However, the before-watch hook skips TS compilation when bundling is in progress. So when a TS file is changed, the changes are not transpiled and the app is never updated with the new code. Sad.
I can fix this locally by commenting these lines in the hook:
Would it be a problem to simply remove the aforementioned check from this hook? It's the only thing stopping us from easily adding TS support to the Vue template.
Hi friends,
I was looking into using TypeScript with https://github.com/nativescript-vue/vue-cli-template and ran into an issue with the
before-watch
hook.The template depends on bundling your code, even during development. That's also required to do HMR actually.
However, the
before-watch
hook skips TS compilation when bundling is in progress. So when a TS file is changed, the changes are not transpiled and the app is never updated with the new code. Sad.I can fix this locally by commenting these lines in the hook:
https://github.com/NativeScript/nativescript-dev-typescript/blob/814d533cca10317b15ce521563e1989fb47c0701/lib/watch.js#L6-L9
Would it be a problem to simply remove the aforementioned check from this hook? It's the only thing stopping us from easily adding TS support to the Vue template.