Closed benmccann closed 4 years ago
Thanks, @benmccann. I was not aware of this feature. I've added it to routify.dev
and the starter template.
Cool! I do see the two files have been combined into one main.js
now :smile:
It just occurred to me. Would it be even better to skip preserveEntrySignatures
and instead import the hashed main-123456.js
directly? For those who don't use service workers, the hash might make a difference.
That would be good too. It would be really nice to hash the main entry point file so that it can be cached by the browser
When I visit https://routify.dev/ there are two main.js files. First there's
main.js
and then it requestsmain-cd4adf5d.js
. This is undesirable for two reasons:main.js
cannot be cached since it does not have a hash in the filename likemain-cd4adf5d.js
doesThe first
main.js
file doesn't really do anything. It'd be nicer if these two files were combined into a single fileIn the Sapper application template these files would be combined by Rollup because of the
preserveEntrySignatures: false
option. The Rollup docs say: