Webpack + HMR + Babel + WASM(Rust cdylib)
This is a fresh and up-to-date wasm-pack repository using Webpack 5 + HMR and Bebel plugin to build a classic package for WEB MDN API developers and beyond.
Overall, the official repository was supposed to be updated by the wasm-pack developers, but unfortunately now you are here. Well, like a typical American from Silicon Valley, I can add that I spent 3 days for 8 hours on this repository and it's posted absolutely for free. That's about how much time I saved for you. I'm sure this repository will serve as a foundation for many new projects, including my projects.
I'm also raising funds to create and maintain a protocol for my new ecosystem for use in WEB 4.0 networks with a decentralized node infrastructure.
Metamask wallet ETH, BNB, MATIC, AVAX: 0xAc3C75F55A51efeEa471bbB7fB4FD00Ec8FcE9e4
npx degit ITC-LittlePrince/webpack-wasm.git my-new-app-name
Don't forget to change my-new-app-name to the name of your project.
npm i
npm run start-windows
or
npm i
npm run start-linux
npm i
npm run build-windows
or
npm i
npm run build-linux
Directory | Functional belonging |
---|---|
/js/ | Directory for development in JavaScript |
/js/bin | Directory for executable files |
/js/lib | Directory for libraries that store interfaces and class objects |
/js/static | Directory for package media files |
/wasm/ | Directory for development in Rust |
/wasm/src | Directory for writing structures, interfaces, and functions using [#wasm-bindgen] |
Note: --openssl-legacy-provider for Node >=v19. Popular error when running. Probably can be removed in the future or in earlier versions of Node.