Skip to content

Compatibility with the vue-cli-template / HMR #65

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

Open
EddyVerbruggen opened this issue Sep 24, 2018 · 0 comments
Open

Compatibility with the vue-cli-template / HMR #65

EddyVerbruggen opened this issue Sep 24, 2018 · 0 comments

Comments

@EddyVerbruggen
Copy link

EddyVerbruggen commented Sep 24, 2018

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:

if (appFilesUpdaterOptions.bundle) {
$logger.warn("Hook skipped because bundling is in progress.")
return;
}

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.

@EddyVerbruggen EddyVerbruggen changed the title Compatibility with the new NativeScript-Vue template Compatibility with the vue-cli-template / HMR Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant