Skip to content

Commit df83872

Browse files
Martin BučkoGuillaume Chau
Martin Bučko
authored and
Guillaume Chau
committed
Fix <style> hot-reload not working (#252)
* Fix <style> hot-reload not working Code changes inside <style> tag in .vue file don't emit CSS update to client. Bug confirmed on meteor-vue/vue-meteor-demo. * Fix <style> hot-reload not working, changed in different place * should be true on booth place
1 parent 3608916 commit df83872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vue-component/plugin/vue-compiler.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ VueComponentCompiler = class VueCompo extends CachingCompiler {
210210
if (css) {
211211
if (isDev) {
212212
// Add style to client first-connection style list
213-
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, false)
213+
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, true);
214214
} else if (!isLazy) {
215215
// In order to avoid lazy-loading errors in --production mode, addStylesheet must come after addJavaScript
216216
this.addStylesheet(inputFile, {
@@ -375,7 +375,7 @@ const hotCompile = Meteor.bindEnvironment(function hotCompile(filePath, inputFil
375375
// Hot-reloading
376376
cssHash = Hash(css)
377377
if (cache.css !== cssHash) {
378-
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath })
378+
global._dev_server.__addStyle({ hash: vueId, css, path: inputFilePath }, true);
379379
}
380380

381381
if (compileResult.cssModules) {

0 commit comments

Comments
 (0)