<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dominic Jean</title>
    <description>The latest articles on DEV Community by Dominic Jean (@dejy).</description>
    <link>https://dev.to/dejy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1183828%2Ffe6b0f01-8ad8-4d0f-a99b-8bd2d9c08e06.png</url>
      <title>DEV Community: Dominic Jean</title>
      <link>https://dev.to/dejy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dejy"/>
    <language>en</language>
    <item>
      <title>The fastest way to start a Mithril + Ionic + Vite project in 2025</title>
      <dc:creator>Dominic Jean</dc:creator>
      <pubDate>Fri, 21 Nov 2025 02:04:57 +0000</pubDate>
      <link>https://dev.to/dejy/the-fastest-way-to-start-a-mithril-ionic-vite-project-in-2025-2lon</link>
      <guid>https://dev.to/dejy/the-fastest-way-to-start-a-mithril-ionic-vite-project-in-2025-2lon</guid>
      <description>&lt;p&gt;Building mobile-ready web applications often involves a heavy stack. You have React, Angular, or Vue combined with a UI framework, and suddenly your bundle size is massive before you've even written a line of code.&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;Mithril.js&lt;/strong&gt;. It's a modern client-side JavaScript framework for building Single Page Applications. It's small (&amp;lt; 10kb gzip), fast, and provides routing and XHR utilities out of the box.&lt;/p&gt;

&lt;p&gt;Combine that with &lt;strong&gt;Ionic Framework&lt;/strong&gt; for native-like UI components and &lt;strong&gt;Vite&lt;/strong&gt; for instant dev server start times, and you have a powerhouse stack for rapid development.&lt;/p&gt;

&lt;p&gt;But setting this up manually? Configuring Vite to handle Mithril's JSX (or Hyperscript), setting up Ionic's loader, configuring the router... it's a pain.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;&lt;a href="https://github.com/DeJy/vitriol" rel="noopener noreferrer"&gt;create-vitriol&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Vitriol?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;create-vitriol&lt;/code&gt; is a scaffolding tool that sets up a production-ready Mithril.js project powered by Vite. It supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  ⚡️ &lt;strong&gt;Vite&lt;/strong&gt;: Instant server start and HMR.&lt;/li&gt;
&lt;li&gt;  📱 &lt;strong&gt;Ionic&lt;/strong&gt;: Optional integration for mobile UI components.&lt;/li&gt;
&lt;li&gt;  📘 &lt;strong&gt;TypeScript&lt;/strong&gt;: First-class support.&lt;/li&gt;
&lt;li&gt;  🔧 &lt;strong&gt;Flexible Syntax&lt;/strong&gt;: Choose between JSX or Standard (Hyperscript).&lt;/li&gt;
&lt;li&gt;  🧪 &lt;strong&gt;Testing&lt;/strong&gt;: Pre-configured with Vitest.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;You don't need to install anything globally. Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vitriol@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Or &lt;code&gt;yarn create vitriol&lt;/code&gt;, &lt;code&gt;pnpm create vitriol&lt;/code&gt;, &lt;code&gt;bun create vitriol&lt;/code&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  The Interactive Setup
&lt;/h3&gt;

&lt;p&gt;The CLI will guide you through a few simple questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Project Name&lt;/strong&gt;: What do you want to call your app?&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Project Type&lt;/strong&gt;: Standard (Hyperscript) or JSX?&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Language&lt;/strong&gt;: Javascript/TypeScript?&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Ionic&lt;/strong&gt;: Yes/No? (Select &lt;strong&gt;Yes&lt;/strong&gt; for this tutorial!)&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;DevContainer&lt;/strong&gt;: Do you want a Docker dev environment?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's it! In less than a second, your project is scaffolded.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Look Inside
&lt;/h2&gt;

&lt;p&gt;Let's say you chose &lt;strong&gt;Standard (Hyperscript)&lt;/strong&gt; + &lt;strong&gt;Ionic&lt;/strong&gt; + &lt;strong&gt;TypeScript&lt;/strong&gt;. Here is what the generated code looks like.&lt;/p&gt;

&lt;h3&gt;
  
  
  File-System Routing
&lt;/h3&gt;

&lt;p&gt;Vitriol comes with a lightweight file-system router. You don't need to manually define route maps. Just create a file in &lt;code&gt;src/pages/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;src/pages/home.ts&lt;/code&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mithril&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Home&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;view&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-page&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-header&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-toolbar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-title&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-content&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-padding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;h1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome to Vitriol&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;p&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is a Mithril + Ionic + Vite app.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="nf"&gt;m&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ion-button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;onclick&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Click Me&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;])&lt;/span&gt;
      &lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how we are using standard Ionic Web Components (&lt;code&gt;ion-page&lt;/code&gt;, &lt;code&gt;ion-header&lt;/code&gt;, &lt;code&gt;ion-button&lt;/code&gt;) directly within Mithril's &lt;code&gt;m()&lt;/code&gt; function. It works seamlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running the App
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-app
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your app will be running at &lt;code&gt;http://localhost:5173&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this stack?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Performance&lt;/strong&gt;: Mithril is incredibly fast. Combined with Vite, the development experience is instantaneous.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Simplicity&lt;/strong&gt;: No complex build steps or "magic" imports. It's just JavaScript/TypeScript.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Mobile Ready&lt;/strong&gt;: Ionic provides the look and feel of a native mobile app, making it easy to wrap with Capacitor later.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Give it a try!
&lt;/h2&gt;

&lt;p&gt;If you are looking for a lightweight alternative to the big frameworks without sacrificing modern tooling, give &lt;strong&gt;Vitriol&lt;/strong&gt; a spin.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/DeJy/vitriol" rel="noopener noreferrer"&gt;https://github.com/DeJy/vitriol&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;NPM&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/create-vitriol" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/create-vitriol&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find it useful, please leave a ⭐️ on GitHub! Happy coding!&lt;/p&gt;

</description>
      <category>ionic</category>
      <category>vite</category>
      <category>mithril</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Vitriol: Mithril+Vite</title>
      <dc:creator>Dominic Jean</dc:creator>
      <pubDate>Wed, 01 Nov 2023 01:28:37 +0000</pubDate>
      <link>https://dev.to/dejy/vitriol-mithrilvite-3ba1</link>
      <guid>https://dev.to/dejy/vitriol-mithrilvite-3ba1</guid>
      <description>&lt;h2&gt;
  
  
  ⚡ Setting Up Mithril + Vite Using Vitriol
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/DeJy/vitriol" rel="noopener noreferrer"&gt;Vitriol&lt;/a&gt; is a lightweight npm package that integrates &lt;a href="https://mithril.js.org/" rel="noopener noreferrer"&gt;Mithril&lt;/a&gt; with &lt;a href="https://vitejs.dev/" rel="noopener noreferrer"&gt;Vite&lt;/a&gt; and &lt;a href="https://ionicframework.com/" rel="noopener noreferrer"&gt;Ionic Framework&lt;/a&gt;, enabling fast and modern frontend development.&lt;/p&gt;

&lt;h3&gt;
  
  
  🛠 Prerequisites
&lt;/h3&gt;

&lt;p&gt;Make sure you have the following before starting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js and npm installed&lt;/li&gt;
&lt;li&gt;Your preferred code editor&lt;/li&gt;
&lt;li&gt;Basic knowledge of JavaScript and Mithril&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🚀 Step 1: Create Your Project with Vitriol
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vitriol@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;If you're using Vitriol for the first time, npm will prompt you to install the package.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧩 Step 2: Configure Project Setup
&lt;/h3&gt;

&lt;p&gt;You’ll be asked to choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project type: &lt;code&gt;JSX&lt;/code&gt; or &lt;code&gt;Standard&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Language: &lt;code&gt;JavaScript&lt;/code&gt; or &lt;code&gt;TypeScript&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Project name (default is &lt;code&gt;vitriol-project&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Whether to include the &lt;a href="https://ionicframework.com/" rel="noopener noreferrer"&gt;Ionic Framework&lt;/a&gt; (we recommend including it for this demo)&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;devcontainer.json&lt;/code&gt; configuration?
This option lets you set up a &lt;a href="https://code.visualstudio.com/docs/devcontainers/containers" rel="noopener noreferrer"&gt;Development Container&lt;/a&gt; for seamless coding in environments like GitHub Codespaces or VS Code Remote. Choose Yes if you want to enable this feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 If you use a custom project name, replace &lt;code&gt;vitriol-project&lt;/code&gt; in subsequent steps with your chosen name.&lt;/p&gt;

&lt;p&gt;Alternatively, you can use command-line arguments to skip prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example: Create a TypeScript project with Standard syntax&lt;/span&gt;
npm create vitriol@latest my-app &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--standard&lt;/span&gt; &lt;span class="nt"&gt;--ts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  📦 Step 3: Install Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;vitriol-project
npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait until installation completes.&lt;/p&gt;




&lt;h3&gt;
  
  
  🌐 Step 4: Start Development Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open the URL displayed in your terminal to see your running app in the browser.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔧 Step 5: Explore and Update the App
&lt;/h3&gt;

&lt;p&gt;The source files are in the &lt;code&gt;/src&lt;/code&gt; folder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;main.js&lt;/code&gt; (or &lt;code&gt;main.ts&lt;/code&gt;) sets up components and Mithril routes automatically&lt;/li&gt;
&lt;li&gt;All &lt;code&gt;.js&lt;/code&gt;, &lt;code&gt;.jsx&lt;/code&gt;, &lt;code&gt;.ts&lt;/code&gt;, or &lt;code&gt;.tsx&lt;/code&gt; files inside &lt;code&gt;/pages&lt;/code&gt; are auto-registered as routes&lt;/li&gt;
&lt;li&gt;Access pages via URLs like &lt;code&gt;/#/pagename&lt;/code&gt; or programmatically with &lt;code&gt;m.route.set("/pagename")&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ Step 6: Automate Testing with Vitest
&lt;/h3&gt;

&lt;p&gt;Tests live in the &lt;code&gt;/test&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;To run them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  📦 Step 7: Build for Production
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The build output is placed in the &lt;code&gt;/dist&lt;/code&gt; directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run preview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To test your production-ready files locally before deploying&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>vite</category>
      <category>mithril</category>
      <category>ionic</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
