Hackernews example powered by solid-start
;
npm init solid@latest -- --template hackernews
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Client side debugging requires sourceMap to be set. Since we are using Vite, it's necessary to set it via {build: {sourceMap: true }}
option within vite.config.ts. This provides client side
debugging within the browser. Server side debugging via VSCode at this time with solid-start is
difficult/broken since code is not attaching or stopping at breakpoints. Adding debugger;
on page seem to help trigger breakpoints; however, the component api/ handlers are still somewhat
unpredictable.
SolidStart apps are built with adapters, which optimise your project for deployment to different environments.
By default, npm run build
will generate a Node app that you can run with npm start
. To use a different adapter, add it to the devDependencies
in package.json
and specify in your vite.config.js
.