How to build SolidJS application with esbuild
I this article, I'll show who to build SolidJS application with esbuild.
Code generation
First I generate code following the documentation:
$ npx degit solidjs/templates/js esbuild-solid
npx: installed 1 in 0.664s
> cloned solidjs/templates#HEAD to e...
how-to.dev3 min read
Perfect timing! I just had a question on this and your article solved the problem I had! I tried and it works beautifully!
Just a couple of minor improvements:
!/usr/bin/env nodeas the first line and then runningchmod +x build.jsscriptssection inpackage.jsoncan be updated to run this script whennpm run buildis called:"scripts": { "start": "vite", "dev": "vite", "build": "./build.js", "serve": "vite preview" },For typescript, I found that I simply needed to change the
entryPointsvalue toentryPoints: ["src/index.tsx"],.