You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a bundle for my frontend app with Deno.emit(). I'm using a bunch of dependencies from jspm which I don't want to include into the bundle and let the browser import them instead. This would allow me to leverage the caching benefits coming from using a CDN.
I was thinking about adding the external_modules option to EmitOptions that mimics one of swc_bundler and accepts an array of absolutely resolved module specifiers but I think a better option could be a function that gets the module specifier in and tells if it should be external or not.
Maybe it can be the same load function proposed here: denoland/deno#9866 but using some special return value indicating the module import should be left intact. What do you think?
The text was updated successfully, but these errors were encountered:
It is strongly related to denoland/deno#9866, but there has been some debate internally with the core team about the roadmap with Deno.emit(). I plan to come up with a stronger proposal in the very near future and will include trying to address this use case as part of that proposal. We need to get alignment with the general direction with Deno.emit() before anyone expends any effort trying to implement more features.
I'm trying to create a bundle for my frontend app with
Deno.emit()
. I'm using a bunch of dependencies from jspm which I don't want to include into the bundle and let the browser import them instead. This would allow me to leverage the caching benefits coming from using a CDN.swc_bundler
that's used under the hood inDeno.emit()
already supports it: https://github.com/swc-project/swc/blob/4e7723a7a0286f49124e7dc1ca10668ad6a237a9/bundler/src/bundler/mod.rs#L34 so it should be pretty straight-forward to add it to Deno. I'm also happy to take on this if you are happy with the proposal.I was thinking about adding the
external_modules
option toEmitOptions
that mimics one ofswc_bundler
and accepts an array of absolutely resolved module specifiers but I think a better option could be a function that gets the module specifier in and tells if it should be external or not.Maybe it can be the same
load
function proposed here: denoland/deno#9866 but using some special return value indicating the module import should be left intact. What do you think?The text was updated successfully, but these errors were encountered: