Skip to content
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

How can I know whether the process is running in esbuild.serve in a plugin? #1402

Open
JounQin opened this issue Jun 28, 2021 · 2 comments
Open
Labels

Comments

@JounQin
Copy link

JounQin commented Jun 28, 2021

I'm trying to write a html entry plugin for esbuild, and I want to know if it is running in esbuild.serve, because no physical file system is available to emit new files. Instead, I'm trying to use blob: url if possible on development(esbuild.serve).

For now, I have to declare an option serve?: boolean for this plugin.


Besides, if there is a virtual file system API for esbuild.serve, that would be greater.

@evanw
Copy link
Owner

evanw commented Jun 28, 2021

This is not possible at the moment, sorry.

For now, I have to declare an option serve?: boolean for this plugin.

This sounds like an appropriate workaround.

@jasonwilliams
Copy link

jasonwilliams commented Mar 4, 2022

@JounQin do you have a link to your html plugin? Was stuck on a similar thing and blob sounds like a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants