You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugin version: 2.3.0
When using style pre/post-processing through ngsnow, Snowpack's HMR will trigger a full reload on the browser when a style file changed, only changes in style files will trigger this behavior.
Reason
When using ngsnow, the plugin artificially requests a build from Snowpack to compile the style files for Angular's consumption, unfortunately, this triggers Snowpack to record this style file as potentially exists on the page despite it doesn't (Styles exists bundled within component.js in Angular, HMR-ing the component.js will suffice).
Snowpack's HMR Engine will fire a reload event since it thinks the css file is loaded in browser but there is no <style>.css.proxy.js loaded in the browser to accept the HMR module.
Unfortunately, it seems like there is no easy way to solve this currently other than implementing style pre/post-processing capabilities standalone within the plugin since we won't be requesting the files through Snowpack.
The text was updated successfully, but these errors were encountered:
Background
Plugin version: 2.3.0
When using style pre/post-processing through
ngsnow
, Snowpack's HMR will trigger a full reload on the browser when a style file changed, only changes in style files will trigger this behavior.Reason
When using
ngsnow
, the plugin artificially requests a build from Snowpack to compile the style files for Angular's consumption, unfortunately, this triggers Snowpack to record this style file as potentially exists on the page despite it doesn't (Styles exists bundled within component.js in Angular, HMR-ing the component.js will suffice).Snowpack's HMR Engine will fire a reload event since it thinks the css file is loaded in browser but there is no
<style>.css.proxy.js
loaded in the browser to accept the HMR module.The code snippet in
snowpack
that causes this.https://github.com/snowpackjs/snowpack/blob/41c29f25e53695ec84c07386af7eb140d0b22a8e/snowpack/src/commands/dev.ts#L1226-L1268
The code snippet in
ngsnow
that causes this.angular-snowpack-plugin/src/ngsnow.ts
Line 21 in c0556e9
Proposal
Unfortunately, it seems like there is no easy way to solve this currently other than implementing style pre/post-processing capabilities standalone within the plugin since we won't be requesting the files through Snowpack.
The text was updated successfully, but these errors were encountered: