Closed jedahan closed 1 year ago
Since I was getting OOM running the build, I decided to try esbuild. It seems almost to work, here is what I have so far:
esbuild --bundle src/ui.tsx \ --outfile=dist/ui/main.js \ --tsconfig=tsconfig.web.json \ --loader:.svg=file \ --loader:.worker.js=file \ --sourcemap \ --define:IS_WEB=1
I had to manually add <script src="main.js"></script> and <link href="main.css" rel="stylesheet" /> to index.html, and copy that over to dist/ui.
<script src="main.js"></script>
<link href="main.css" rel="stylesheet" />
dist/ui
Now the only thing missing is an error "missing navigator.serial" when running the app. Any suggestions welcome.
Setting to IS_WEB=0 fixes the navigator.serial error (not using webserial to connect this)
I got esbuild working, which allows saxi to be built on a raspberry pi as webpack OOMs even with 1.5Gb. PR is #186
Since I was getting OOM running the build, I decided to try esbuild. It seems almost to work, here is what I have so far:
I had to manually add
<script src="main.js"></script>
and<link href="main.css" rel="stylesheet" />
to index.html, and copy that over todist/ui
.Now the only thing missing is an error "missing navigator.serial" when running the app. Any suggestions welcome.