Skip to content

ArthurClemens/mithril-vite-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mithril Vite Starter

Vite starter template to scaffold a new Mithril project.

This is an unopinionated template; aside from Mithril and Vite, the rest of your project's tools are entirely up to you.

Installation

Pull the template files with degit and install dependencies.

npx degit ArthurClemens/mithril-vite-starter my-project
cd my-project
npm install

npm scripts

  • npm run dev - Starts the development server at port 3000
  • npm run build - Builds the application
  • npm run preview - Serves the build files locally at port 5000

Using JSX

Uncomment the esbuild configuration in vite.config.js.

Example App.jsx:

import m from "mithril";
import "./App.css";

export const App = () => {
  // Local state ...
  return {
    view: () => {
      return (
        <>
         <h1>My Mithril App</h1>
        </>
      )
    },
  };
};

See also

About

Mithril starter template for Vite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published