jfortunato / esbuild-plugin-manifest

Esbuild plugin for building an asset manifest file.
MIT License
31 stars 5 forks source link

code splitting #22

Closed g4-otayyan closed 7 months ago

g4-otayyan commented 7 months ago

Hi,

Sorry for not addding many details, but if you have multiple entrypoints, and code splitting enabled in ESBuild, and file hashing set in entryNames, it shows a file conflict error

/<project-path>/.yarn/__virtual__/esbuild-plugin-manifest-virtual-6d5c33ef62/0/cache/esbuild-plugin-manifest-npm-1.0.2-c156b5d4ca-10c0.zip/node_modules/esbuild-plugin-manifest/lib/index.js:132:26: ERROR: [plugin: manifest] There is a conflicting manifest key for 'chunk.js'. First conflicting output: 'chunk-EZF3Y3R7.js'. Second conflicting output: 'chunk-2QITM3BJ.js'.

I am using esbuild 0.20 and version 1.0.2 of this library.

jfortunato commented 7 months ago

Enabling code splitting with ESBuild should no longer throw a file conflict error in esbuild-plugin-manifest, starting with v1.0.3

ayervandyan commented 5 months ago

@jfortunato I am still having this issue with v1.0.3 version

emilbjorklund commented 2 months ago

@jfortunato I'm seeing an issue with this when combined with source maps: the name will be chunk for the actual chunks, so the fix works in that case – but source maps will all have the name chunk.js (based off the name chunk.js.map), so there the collision happens anyway.