I'm not sure how those files are not getting bundled by the esbuild build step 😕
We should make sure that they are actually bundled in, or if that's not possible, everything that the worker requires should just need to live in the output directory and no external file/dependency should be needed.
The
nextjs-worker-builder
package does output a worker in the specified output directory (defaulting to.next-worker
).This directory also contains the required assets and should just contain everything that is needed to run the worker.
But this is not so, as there are clear signs that files within
.next-worker
make use of files outside of the directory. For example:aliases
in the app's toml filewebpack-runtime.js
fileI'm not sure how those files are not getting bundled by the esbuild
build
step 😕We should make sure that they are actually bundled in, or if that's not possible, everything that the worker requires should just need to live in the output directory and no external file/dependency should be needed.