Skip to content

Fix <style> hot-reload not working #252

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

Merged
merged 4 commits into from
Jan 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/vue-component/plugin/vue-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ VueComponentCompiler = class VueCompo extends CachingCompiler {
if (css) {
if (isDev) {
// Add style to client first-connection style list
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, false)
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, true);
} else if (!isLazy) {
// In order to avoid lazy-loading errors in --production mode, addStylesheet must come after addJavaScript
this.addStylesheet(inputFile, {
Expand Down Expand Up @@ -364,7 +364,7 @@ const hotCompile = Meteor.bindEnvironment(function hotCompile(filePath, inputFil
// Hot-reloading
cssHash = Hash(css)
if (cache.css !== cssHash) {
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath })
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, true);
}
}
}
Expand Down