-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
add support for esbuild-wasm #342
Comments
I'm also interested in making |
We'd like to accept this feature if anyone can make a PR for it. |
Wouldn't it be more like this? async function requireEsbuild() {
try {
return await import('esbuild');
} catch (error) {
try {
return await import('esbuild-wasm');
} catch {
throw error;
}
}
} Alternatively, what if we allowed consumers to provide their own instance of ESBuild in the plugin constructor? That would allow consumers of the plugin to import ESBuild-WASM however they like. |
For a browser build we'd also need to remove these dependencies: import { existsSync, statSync } from 'fs'
import { extname, resolve, dirname, join } from 'path' |
Would adding
esbuild-wasm
as a peer-dependency and loading esbuild as:The text was updated successfully, but these errors were encountered: