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
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Its supposed to compress my output files and generate the client.12345.js.gz file alongside the generate source file client.12345.js. The plugin still generates the compressed file, but the content is not the same as the source, after the whole rollup bundling is finished. It seems, that in sapper/dist/create_manifest_data.js a plugin named 'sapper-css-injection' is using the generateBundle rollup hook to overwrite some placeholders, in order to inject CSS properly. The generateBundle hook seems to be pushed after the gzipPlugin and its own generateBundle hook, therefore the source is overwritten and saved, after the gzipPlugin has compressed it, leading to different content in both files.
In best case sapper would not use the generateBundle hook.
Workaround: I have implemented a custom compression plugin, which uses the rollup writeBundle hook, being executed after all generateBundle hooks have been finished:
This issue appears after upgrading to 0.29.x. I used the gzipPlugin() in my sapper projects rollup plugin configuration for my client like this:
Its supposed to compress my output files and generate the
client.12345.js.gz
file alongside the generate source fileclient.12345.js
. The plugin still generates the compressed file, but the content is not the same as the source, after the whole rollup bundling is finished. It seems, that insapper/dist/create_manifest_data.js
a plugin named 'sapper-css-injection' is using the generateBundle rollup hook to overwrite some placeholders, in order to inject CSS properly. The generateBundle hook seems to be pushed after the gzipPlugin and its own generateBundle hook, therefore the source is overwritten and saved, after the gzipPlugin has compressed it, leading to different content in both files.In best case sapper would not use the generateBundle hook.
Workaround: I have implemented a custom compression plugin, which uses the rollup writeBundle hook, being executed after all generateBundle hooks have been finished:
The text was updated successfully, but these errors were encountered: