-
Notifications
You must be signed in to change notification settings - Fork 29
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
building fails with esbuild #17
Comments
I guess that is why I had decided not to use the bundle js. This issue happend in the old webpack but now webpack seems to work fine. Anyway, seems like your are trying to build a frontend bundle. Can you check if esbuild is using the |
yes, it's using load-browser (i've tried with import { scanImageData } from "../zbar.wasm/dist/load-browser.js";) i think it's due to this line const zbar_1 = __importDefault(require("./zbar")); that has some node dependencies |
@samsam2310 esbuild --bundle --minify --external:path --external:fs --loader:.bin=file --loader:.wasm=binary --sourcemap src/index.js --outfile=public/main.js |
As a side note, Webpack 4 + file-loader 6.2.0 handle This would also remove the necessity for configuring the server to serve |
That is great. So we could:
|
@samsam2310 Please take a look at the I am using this successfully for minified builds of a ZBar ES module, a CommonJS module and a browser script in this branch of my fork of your repo. Polyfilling |
I know what the bundle is. If you see the readme in v1.0.0, you can find the document about polyfilling |
@samsam2310 I couldn't find any notion of polyfilling |
Since the last update, I'm not able to build with esbuild
I get something like this (using 2.1.1, it was working before)
If I had --platform=node, it works but then it doesn't seem to build properly the wasm file
Uncaught (in promise) RuntimeError: Aborted(both async and sync fetching of the wasm failed). Build with -s ASSERTIONS=1 for more info.
Before it was creating a bin file in my public folder
The text was updated successfully, but these errors were encountered: