Rollup: use preserveEntrySignatures = 'exports-only' setting in lightweight build

This is the default setting and it ensures that the main chunk does not include
additional exports, which is is important when importing the module as `import *`
as shown in the readme.
In practice, this change does not affect the chunking with the current code.
This commit is contained in:
larabr 2023-10-23 17:34:04 +02:00
parent 4ee9deae62
commit 86f5a8b71b

View File

@ -98,7 +98,7 @@ export default Object.assign([
{ dir: 'dist/lightweight', entryFileNames: 'openpgp.mjs', chunkFileNames: chunkInfo => getChunkFileName(chunkInfo, 'mjs'), format: 'es', banner, intro },
{ dir: 'dist/lightweight', entryFileNames: 'openpgp.min.mjs', chunkFileNames: chunkInfo => getChunkFileName(chunkInfo, 'min.mjs'), format: 'es', banner, intro, plugins: [terser(terserOptions)], sourcemap: true }
],
preserveEntrySignatures: 'allow-extension',
preserveEntrySignatures: 'exports-only',
plugins: [
resolve({
browser: true