You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I use esbuild in browser, if outfile is relative path (even though write is false) will cause error, which seems caused by golang doesn't implement fs.stat when target GOOS=js
async function main() {
const service = await esbuild.startService({
wasmURL: 'https://unpkg.com/[email protected]/esbuild.wasm',
});
const result = await service.build({
stdin: {
contents: `const x = 1`,
},
write: false,
outfile: 'esbuild.js',
});
console.log('result:', result);
}
main();
The text was updated successfully, but these errors were encountered:
Thanks for the heads up. For now, I believe a workaround is to use an absolute path. I need to figure out what to do about paths with WebAssembly. It turns out Go's path library is pretty broken when targeting WebAssembly so I may need to fork the standard library and implement path manipulation myself. Fixing that would make it easy to fix this too.
when I use esbuild in browser, if outfile is relative path (even though write is false) will cause error, which seems caused by golang doesn't implement fs.stat when target GOOS=js
The text was updated successfully, but these errors were encountered: