Skip to content

Latest commit

 

History

History

kitchen-sink-preact

Preact example

An example that shows how to write a custom element and then use it in a Preact component's template including type checking, autocompletion, and intellisense.

Running the example

install dependencies

For this example, use the following command to install dependencies if you will run it inside of a cloned @lume/element repo:

npm clean-install --no-workspaces --install-links

If that doesn't work due to the package-lock (sometimes it fails when the linked package changes), run

npm install --no-workspaces --install-links

If you will copy this example to a standalone folder, outside of the @lume/elemenet code repository, modify the package.json file so that this dependency,

"@lume/element": "../.."

is replaced with the latest version range of the @lume/element package, for example:

"@lume/element": "^0.15.0"

and then run

npm install

Run the example

  • npm run dev - Starts a dev server at http://localhost:5173/

  • npm run build - Builds for production, emitting to dist/. Prerenders app to static HTML

  • npm run preview - Starts a server at http://localhost:4173/ to test production build locally

If any questions, reach out on the Lume chat server or the forum (preferred, but you should join both to get the best help).