mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-11 17:14:15 +00:00
441d517a52c578a85e692cd9dc000ac1bc9d8d65
This moves the .wasm file out of the static/js/ folder and into the
source tree. This way we can import it and webpack will pick it up
and version the file with a hash.
This fixes possibly running with an out of date file from the browser
cache and also fixes running offline.
The file extension had to be changed because there is a default rule in
webpack that matches the .wasm extension and causes the following error:
Failed to compile.
./src/sagas/mpy-cross.wasm
Module parse failed: magic header not detected
File was processed with these loaders:
* ./node_modules/file-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
Error: magic header not detected
The webpack configuration cannot be modified without ejecting
create-react-app or using something like react-app-rewired, which we
would like to avoid.
Also using ncp to copy file now which fixes building on Windows.
pybricks-code
A Web App for programming LEGO® Powered Up smart hubs using Pybricks MicroPython.
LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project
Languages
TypeScript
90%
JavaScript
7.6%
SCSS
2.1%
HTML
0.2%
Python
0.1%