wix / stylable

Stylable - CSS for components
https://stylable.io
MIT License
1.26k stars 62 forks source link

chore: upgrade to support for `rollup@4` #2919

Closed idoros closed 8 months ago

idoros commented 8 months ago

This PR introduces an upgrade to the tested rollup integration, bumping it up to version 4, and ensure it works.

During testing, one issue surfaced where files loaded via the integration's load hook were not automatically watched. This update addresses this issue by explicitly adding them to the list of watched files within the integration.

Furthermore, it's worth noting that rollup@4 installation includes WASM artifacts, which, in some cases, led to failed installation on Windows machines. This problem was resolved by ensuring that Microsoft Visual C++ is installed. The installer for Microsoft Visual C++ can be obtained from this link: https://aka.ms/vs/17/release/vc_redist.x64.exe.

barak007 commented 8 months ago

Another important change is that Rollup watch mode will no longer watch ids of files that have been loaded via a plugin load hook. So this mainly affects "virtual" files, where it really does not make sense to watch a hard drive location for changes. Instead, it is now up to plugins that use a load hook to manually call this.addWatchFile() for all the files they depend on to handle the load hook.

Did you checked all locations?

idoros commented 8 months ago

The only change is the load hook