"Complicated" dynamic import and deno bundle for the browser ..
I recently updated from 2.4 to 2.5, specifically for the new html entrypoint feature for the bundle command.
Before upgrading, bundling ts/css to browser-ready output works fine. After upgrading, not only am I seeing several thousand chunks from bundled output, but also new errors in the browser console regarding missing .js files.
Some diagnostic work shows the problem package to be
browser-fs-access, which is a dependency of one of my direct dependencies, and the problem code to be dynamic imports, as in the following:
The errors in the browser look like the following:
Any guidance/help/tips are appreciated. Thanks!1 Reply
Update: This turned out to be an issue with the way
denoServeDir resolves paths. Something about the /_.._/_.._/ etc in paths causes the method to 404 for these files. I haven't had a chance to do any further testing to build out a test case yet, but I plan to submit an issue later today. For the moment I'm rolling my own logic for path. lookup and serving with serveFile, which works great.