Skip to content
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

Reload Vue template when CSS modules change in the <style> attribute #164

Merged
merged 2 commits into from Jan 27, 2018

Conversation

akanix42
Copy link
Contributor

When using CSS modules, a change to the class names causes a change to the $style computed property and therefore requires the template to be reloaded in order to take effect.
For example, if I create the following style, reference it in my template, and save my changes, $style.foo won't exist on the client after the hot refresh because the client won't know that it needs to reload the entire compiled JS instead of just reloading the render function.

<style module>
.foo {
 color: red;
}
</style>

<template>
<div :class="$style.foo"></div>
</template>

This PR adds cache-checking for the CSS modules output.

@Akryum
Copy link
Collaborator

Akryum commented Apr 27, 2017

Big thanks for your PR, as usual! Could you please test your changes against the 0.9.0 release before we could merge it?

@akanix42
Copy link
Contributor Author

Will do. :)

@akanix42 akanix42 closed this Apr 27, 2017
@akanix42 akanix42 reopened this Apr 27, 2017
@akanix42
Copy link
Contributor Author

We've been using this with 0.9.0 no errors, but there's been some weird issues with the styles not always reloading after we make changes, so I'm planning to review this soon in case it's related.

@Akryum
Copy link
Collaborator

Akryum commented Jun 30, 2017

Let me know when this is ready to be merged. 😄

@Akryum
Copy link
Collaborator

Akryum commented Aug 24, 2017

Any news on this? 😄

@Akryum Akryum merged commit d727990 into meteor-vue:master Jan 27, 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

Successfully merging this pull request may close these issues.

None yet

2 participants