brocessing / kirby-webpack

:muscle: A Kirby CMS starter-kit with modern frontend tools
MIT License
179 stars 23 forks source link

Browser sync reload when content changed not working. #30

Closed illycz closed 6 years ago

illycz commented 6 years ago

Kirby 2.5.8 (multilingual setup) kirby-webpack 0.7.0

Error from console: Uncaught SyntaxError: Unexpected identifier in browser-sync-client.js?v=2.23.5:16

I'm using proxy...

Thanks

pqml commented 6 years ago

Hi, this error should be fixed on v7.0.1

https://github.com/brocessing/kirby-webpack/releases/tag/0.7.1

pqml commented 6 years ago

If you want to patch your current setup, just replace the first lines in scripts/utils/browsersync-update-content.js

-/*
-This is a client-side script.
-Don't use node.js methods nor advanced javascript features
-*/
+// This is a client-side script.
+// Don't use node.js methods nor advanced javascript features
illycz commented 6 years ago

Great!

What is the proper way to update kirby-webpack and not to lose changes like proxy settings etc.

Thanks

pqml commented 6 years ago

Sorry, just post the answer to your question :smile:

You only need to edit scripts/utils/browsersync-update-content.js Change the first comment from /* */ notation to // or just remove it

https://github.com/brocessing/kirby-webpack/issues/30#issuecomment-360160979