-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ESBuild in serve mode #44
Labels
wontfix
This will not be worked on
Comments
This was referenced Mar 5, 2022
Latest version of the plugin works with import esbuild from 'esbuild';
import htmlPlugin from '@chialab/esbuild-plugin-html';
await esbuild.serve({
port: 8000,
servedir: 'public',
}, {
entryPoints: ['src/index.html'],
outdir: 'public',
plugins: [htmlPlugin()],
sourcemap: true,
bundle: true,
}); |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When esbuild runs in serve mode it builds and references the main index.html in memory.
this means the relative files it refers to don’t work properly.
here is an example of an error:
one solution I’ve seen is to accept a new option
serve
, which will use data URLs for assets instead of generating files.This may be a workaround until esbuild provides better support.
More info:
esbuild.serve
in a plugin? evanw/esbuild#1402The text was updated successfully, but these errors were encountered: