Closed MariusVatasoiu closed 1 year ago
Hey really thanks for the PR and also Great Work!
I have actually made a more refined version of this http import plugin under https://github.com/lucsoft/esbuild_serve/blob/main/features/httpImports.ts
it has some more bugfixes and new features.
Seeing here new people popup, I wonder if it would be useful if we just reexport it this "internal plugin" here.
I think it would be a nice idea if the plugin would be a separated module. This way, people will easily discover it. I know you can export it from esbuild_serve, but won't have the same visibility. It really is a fantastic plugin 👏.
Also, it won't have any impact on the esbuild_serve module since you can import it there.
And a description on deno.land/x listing would help too.
Currently, the plugin fetches resources only by using the pathname, ignoring the query strings. It should also work with query strings, since they can change entirely a file.
For example, using esm.sh with pinned version:
The plugin will fetch
import styleToJS from 'https://esm.sh/style-to-js@1.1.3';
, which is a different URL and the last version of esm.sh is used, instead ofv113
.The fix should be here, at line 71:
From:
to
I opened a PR #2 for this change.