this plugin replicates esbuild's native path resolution and loading behavior through the plugin api layer.
Note
you will probably want to place this as the last plugin, if you don't want it interfering with your other plugins' resolving and loading mechanisms.
for resolving paths, the plugin creates a sub-build that is free of any contaminating plugins to get esbuild to resolve the input resource naturally.
for loading content, the plugin places an onLoad hook to capture all file-namespace paths,
and then mimics esbuild's native loading behavior by guessing the loader it would use,
and then fetches the content (without invoking esbuild's native loading in the process).
Van: It was Asche who was supposed to come here, not you, replica.
Luke: Even if you refuse to acknowledge me, I am ME! Master... no, Van! Prepare to DIE!
this plugin replicates esbuild's native path resolution and loading behavior through the plugin api layer.
you will probably want to place this as the last plugin, if you don't want it interfering with your other plugins' resolving and loading mechanisms.
onLoadhook to capture all file-namespace paths, and then mimics esbuild's native loading behavior by guessing the loader it would use, and thenfetches the content (without invoking esbuild's native loading in the process).