Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Rollup 2: warning: preserveEntrySignatures #218

Closed
frederikhors opened this issue Apr 29, 2020 · 4 comments · Fixed by #221
Closed

Rollup 2: warning: preserveEntrySignatures #218

frederikhors opened this issue Apr 29, 2020 · 4 comments · Fixed by #221

Comments

@frederikhors
Copy link

frederikhors commented Apr 29, 2020

Trying with Rollup 2 I get this in console:

• client
To preserve the export signature of the entry module "src\client.js", an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.
@thgh
Copy link
Contributor

thgh commented May 23, 2020

This breaks now-sapper because it also removes the intentional export in the server: export default polka()
It can be worked-around by writing module.exports = polka()

@Conduitry
Copy link
Member

Hm I had wondered about that. An extra chunk on the server side probably aren't that big of a deal at all - would it work to make just the server bundle have preserveEntrySignatures: 'strict' instead?

@thgh
Copy link
Contributor

thgh commented May 23, 2020

Just tested 'strict' and indeed, that works! It seems that the current template is not creating chunks, everything is packed in 1 file. (the value of preserveEntrySignatures doesn't matter)

@Conduitry
Copy link
Member

👍 Updated in c5bd6f0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants