craftamap/esbuild-plugin-html

Entry Point Detection Borken If Paths Aren't Relative

GuillaumeCLProdigy opened this issue · 2 comments

I have a a project where the paths passed in are explicitly made relative. This means that the paths passed in through the metafile are relative and look like this:

./src/network/gameServer/catalyst/index.ts
./src/network/multiplayer/server/index.ts
./src/network/analytics/segment/index.ts
./src/network/geolocation/internal/index.ts
./src/debug/enabled/index.ts
./static/framework/.init.js
./src/index.ts

But the paths passed in through the metafile looks like this:

src/network/gameServer/catalyst/index.ts
src/network/multiplayer/server/index.ts
src/network/analytics/segment/index.ts
src/network/geolocation/internal/index.ts
src/debug/enabled/index.ts
static/framework/.init.js
src/index.ts

Because the code here uses an includes rather than a path comparison, none of the entry points get included in the HTML file.

I would ask that either this is made clear in the docs, or that the comparison be fixed.

Faced this today. Changing ./src/index.js to src/index.js solved the issue.