tirr-c / jxl-oxide-wasm-demo

Demo page of jxl-oxide-wasm
https://jxl-oxide.tirr.dev/demo/index.html
Apache License 2.0
3 stars 2 forks source link

Migrate from webpack to parcel #6

Open StratusFearMe21 opened 5 months ago

StratusFearMe21 commented 5 months ago

This is really a take it or leave it kind of PR, I wasn't able to work on a local jxl-oxide-wasm package with webpack, but I had luck with parcel. Thought I'd just contribute my changes upstream.

tirr-c commented 5 months ago

Thanks for the contribution! I haven't tested this yet, but it looks okay for me.

What problem did you encounter with webpack version? I've done builds on a few machines and never hit any problems yet.

StratusFearMe21 commented 5 months ago

What problem did you encounter with webpack version?

It was mostly my own fault, I had never used the wasm-bindgen CLI before, I had always used it through trunk. As it turns out you have to specify --target web as an argument to wasm-bindgen in order for the bundler to be able link it to the rest of the app. webpack gave me a big wall of text error that told me that I needed to enable experimental features for it to work, parcel told me that default was not exported which was a much better error.