This moves the entrypoint of the typescript worker to the same relative location in the src/ tree that it is in the final output, so that any relative external paths in the output bundle point the the right place.
This fixes a problem where imports of ../internal/typescript.js were marked as external, and left in the worker bundle, but the bundle was output to one directory above where the entrypoint was in the source tree, meaning that import should be ./internal/typescript.js and the ../internal/typescript.js import was broken.
In order to have both a rollup input and rollup output at the same level, I needed to rename the input to add an -entrypoint suffix.
This moves the entrypoint of the typescript worker to the same relative location in the src/ tree that it is in the final output, so that any relative external paths in the output bundle point the the right place.
This fixes a problem where imports of
../internal/typescript.js
were marked as external, and left in the worker bundle, but the bundle was output to one directory above where the entrypoint was in the source tree, meaning that import should be./internal/typescript.js
and the../internal/typescript.js
import was broken.In order to have both a rollup input and rollup output at the same level, I needed to rename the input to add an
-entrypoint
suffix.