<?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: Dmitry Titov</title>
    <description>The latest articles on DEV Community by Dmitry Titov (@dimatitov).</description>
    <link>https://dev.to/dimatitov</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%2F2742295%2Fb0cab630-5e76-4f04-b00c-1c1b2de0eef1.png</url>
      <title>DEV Community: Dmitry Titov</title>
      <link>https://dev.to/dimatitov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dimatitov"/>
    <language>en</language>
    <item>
      <title>Help Improve Open Source Onboarding: 3-Minute Survey for Contributors</title>
      <dc:creator>Dmitry Titov</dc:creator>
      <pubDate>Fri, 06 Jun 2025 17:44:45 +0000</pubDate>
      <link>https://dev.to/dimatitov/help-improve-open-source-onboarding-3-minute-survey-for-contributors-hc</link>
      <guid>https://dev.to/dimatitov/help-improve-open-source-onboarding-3-minute-survey-for-contributors-hc</guid>
      <description>&lt;p&gt;🚀 &lt;strong&gt;Open source drives the modern web&lt;/strong&gt;, but getting started can feel overwhelming — especially for newcomers.&lt;/p&gt;

&lt;p&gt;As part of an ongoing research project and upcoming publication, I'm running a short &lt;strong&gt;survey&lt;/strong&gt; to understand how developers first entered the open source world, what challenges they faced, and what helped them stay.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👉 &lt;strong&gt;Take the 3-minute anonymous survey here&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSfggQ8LUoGMNtSUTZvU-MAbBm4lwgY8JDkJyeXwSJTYkstXCA/viewform" rel="noopener noreferrer"&gt;Google Forms&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🎯 Who is this for?
&lt;/h3&gt;

&lt;p&gt;This survey is for anyone who has ever tried contributing to open source — whether you’re a regular contributor, a beginner, or someone who attempted it once.&lt;/p&gt;

&lt;p&gt;I'm currently conducting research for a publication that explores how structured mentorship can help improve onboarding and retention in open source communities. Your input will help:&lt;br&gt;
    • Identify common barriers for newcomers;&lt;br&gt;
    • Understand how mentorship impacts long-term engagement;&lt;br&gt;
    • Inform a proposed model called Open Source Practicum aimed at building inclusive, educational OSS environments.&lt;/p&gt;

&lt;p&gt;The results will be summarized in a public post, and may be used to inform future academic or community research efforts.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;h3&gt;
  
  
  📣 Spread the word
&lt;/h3&gt;

&lt;p&gt;If you've been part of OSS in any way — or tried to be — I’d love your input.&lt;br&gt;&lt;br&gt;
And if you know someone who might have something to say, feel free to share 💙&lt;/p&gt;

&lt;p&gt;Thanks in advance!&lt;br&gt;&lt;br&gt;
— Dmitrii Titov&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>survey</category>
      <category>mentorship</category>
      <category>firstcontributions</category>
    </item>
    <item>
      <title>Open Source Is Waiting for You: How to Stop Being Afraid and Start Contributing</title>
      <dc:creator>Dmitry Titov</dc:creator>
      <pubDate>Mon, 02 Jun 2025 00:20:41 +0000</pubDate>
      <link>https://dev.to/dimatitov/open-source-is-waiting-for-you-how-to-stop-being-afraid-and-start-contributing-1n2n</link>
      <guid>https://dev.to/dimatitov/open-source-is-waiting-for-you-how-to-stop-being-afraid-and-start-contributing-1n2n</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;🧵 The Shortage of Open Source Contributors: Myth or Reality?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Unfortunately — it’s reality 😔&lt;/p&gt;

&lt;p&gt;Do you know how many developers there are in the world today?&lt;/p&gt;

&lt;p&gt;📊 According to &lt;a href="https://www.bairesdev.com/blog/how-many-software-developers-in-the-world/" rel="noopener noreferrer"&gt;Evans Data Corporation&lt;/a&gt;, in 2024 there are over 28.7 million developers globally.&lt;/p&gt;

&lt;p&gt;Sounds like everything should be built already, right?&lt;br&gt;
But let’s look at how many actually contribute to open source…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📉 Linux Foundation Report (2024)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Based on &lt;a href="https://www.linuxfoundation.org/hubfs/LF%20Research/OSS_Developer_Report_2024.pdf" rel="noopener noreferrer"&gt;this survey&lt;/a&gt; of 332 developers involved in OSS:&lt;/p&gt;

&lt;p&gt;👥 Out of 332 people:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem3r8j86yji941q431uk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem3r8j86yji941q431uk.jpg" alt="Image description" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💥 Even among this engaged group, only 17% are consistently active contributors*.&lt;br&gt;
*Sum of maintainers (10%), core contributors (5%), and committers (2%).&lt;/p&gt;

&lt;p&gt;That’s just 1 out of 6 people, and this is from a motivated audience!&lt;/p&gt;

&lt;p&gt;🧵 Of course, these numbers don’t capture everyone who helps open source thrive.&lt;br&gt;&lt;br&gt;
People contribute by writing docs, triaging issues, translating content, answering questions, giving feedback — and it all matters.&lt;br&gt;&lt;br&gt;
Without these roles, maintainers would burn out even faster 💀.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💬 JetBrains Survey Confirms It&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://www.jetbrains.com/lp/devecosystem-2023/development/#contribute_os" rel="noopener noreferrer"&gt;JetBrains’ Dev Ecosystem 2023&lt;/a&gt; (20,000+ devs):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F97qu9jcqowq96uu2nsjs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F97qu9jcqowq96uu2nsjs.jpg" alt="Image description" width="752" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Regular + full-time contributors = just 5–6%&lt;/p&gt;

&lt;p&gt;🎯 Core of active OSS devs = ~15% at best&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧮 Let’s Do the Math&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If we take the optimistic 17% of 28.7M developers:&lt;br&gt;
🔧 ≈ 4.9 million active contributors&lt;/p&gt;

&lt;p&gt;But more realistically (5–11%):&lt;br&gt;
🧑‍💻 ≈ 1.4–3.1 million — the entire OSS backbone&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let that sink in — that’s fewer people than in some cities.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🇺🇸 What About the US?&lt;/strong&gt;&lt;br&gt;
According to GitHub Octoverse 2024:&lt;/p&gt;

&lt;p&gt;🌍 India, China, and Brazil are growing rapidly.&lt;br&gt;
🇮🇳 India is set to become the #1 contributor country by 2028.&lt;br&gt;
🇺🇸 The US still leads, but its share is gradually declining.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚧 Open Source Is Built By a Minority&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even in ideal conditions:&lt;/p&gt;

&lt;p&gt;⚠️ ~80% of developers don’t contribute consistently.&lt;/p&gt;

&lt;p&gt;But instead of panic, this should be a call to action 🧭&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧩 Ways to Contribute Beyond Code&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;📘 Docs&lt;br&gt;
🐞 Bug reports&lt;br&gt;
🌍 Translations&lt;br&gt;
💬 Discussions&lt;br&gt;
🧑‍🏫 Tutorials&lt;br&gt;
🧠 Feedback&lt;br&gt;
🔍 Testing&lt;br&gt;
🤝 Community support&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;💡 Why Don’t More Devs Contribute?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here are the most common blockers:&lt;br&gt;
    • 😰 Fear of judgment (“What if my PR gets mocked?”)&lt;br&gt;
    • 🤷 Low confidence (“I’m not experienced enough…”)&lt;br&gt;
    • ❓ No idea where to start&lt;br&gt;
    • 🌐 Language barrier&lt;br&gt;
    • ⏳ No time (work, burnout, life…)&lt;/p&gt;

&lt;p&gt;These aren’t character flaws. These are fixable with guidance and community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛠️ The Cost of Not Fixing It&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open source is the invisible infrastructure of the tech world.&lt;/p&gt;

&lt;p&gt;But without new contributors:&lt;br&gt;
    • 🐌 Projects stagnate&lt;br&gt;
    • 🔥 Maintainers burn out&lt;br&gt;
    • 🛑 Critical tech loses support&lt;/p&gt;

&lt;p&gt;We’re not talking about missing features, we’re risking missing futures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧬 Lost Potential = Lost Innovation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are millions of devs who want to contribute…&lt;/p&gt;

&lt;p&gt;…but don’t know how, or are afraid to try 😞&lt;/p&gt;

&lt;p&gt;That means millions of ideas that stay locked.&lt;br&gt;
That’s not sustainable.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🧭 So, How Do We Fix This?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We’re not asking everyone to become maintainers overnight.&lt;/p&gt;

&lt;p&gt;But we can make the first step easier — together.&lt;br&gt;
The door to open source shouldn’t feel locked.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🤗 1. Make Projects Feel Welcoming&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;People don’t contribute to repos — they contribute to communities.&lt;/p&gt;

&lt;p&gt;A good README isn’t just technical — it says:&lt;br&gt;
“You belong here.”&lt;br&gt;
    • Start with why this project matters&lt;br&gt;
    • Add a clear “How to Contribute” section&lt;br&gt;
    • Include a real Code of Conduct (humans first!)&lt;/p&gt;

&lt;p&gt;📌 &lt;a href="https://github.com/mui/material-ui/blob/master/README.md" rel="noopener noreferrer"&gt;MUI’s README&lt;/a&gt; is a great example — technical and human.&lt;/p&gt;

&lt;p&gt;🧠 People won’t contribute if they don’t feel invited.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📖 2. Docs = Love&lt;/strong&gt;&lt;br&gt;
    Documentation is the first handshake.&lt;br&gt;
Done right, it says: “We care about your time.”&lt;/p&gt;

&lt;p&gt;Include:&lt;br&gt;
    • 🛠 Setup steps that actually work&lt;br&gt;
    • 🧪 Clear testing instructions&lt;br&gt;
    • 🧠 A “What to do if you’re stuck” section&lt;/p&gt;

&lt;p&gt;Every unclear instruction is a contributor lost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🐣 3. “Good First Issues” Aren’t a Meme&lt;/strong&gt;&lt;br&gt;
Tagging tasks with “good first issue” isn’t charity — it’s strategy.&lt;/p&gt;

&lt;p&gt;They should be:&lt;br&gt;
    • 🧩 Small and self-contained&lt;br&gt;
    • 🧭 Explained with real context&lt;br&gt;
    • 🔁 Even small things (rename, doc fix) matter&lt;/p&gt;

&lt;p&gt;Want to try?&lt;br&gt;
Here are real ones you can do today in &lt;a href="https://github.com/dimatitov/vite-plugin-create" rel="noopener noreferrer"&gt;vite-plugin-create&lt;/a&gt;:&lt;br&gt;
    • &lt;a href="https://github.com/dimatitov/vite-plugin-create/issues/2" rel="noopener noreferrer"&gt;Add plugin usage example to vite.config.ts&lt;/a&gt; — help devs get started faster.&lt;br&gt;
🛠 PR welcome&lt;br&gt;
    • &lt;a href="https://dev.toconfig"&gt;Unify default config naming&lt;/a&gt; — tiny change, real impact.&lt;br&gt;
🛠 PR welcome&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Where to Find Beginner-Friendly Projects?&lt;/strong&gt;&lt;br&gt;
Even if you’re not ready to contribute here — there’s a world of welcoming projects waiting for you:&lt;br&gt;
    • &lt;a href="https://goodfirstissue.dev/" rel="noopener noreferrer"&gt;goodfirstissue.dev 🟢&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://up-for-grabs.net/" rel="noopener noreferrer"&gt;up-for-grabs.net 🧩&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://firstcontributions.github.io/" rel="noopener noreferrer"&gt;firstcontributions.github.io 🎓&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://www.codetriage.com/" rel="noopener noreferrer"&gt;codetriage.com 🧑‍⚕️&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each one helps you discover real issues — not just toy examples — and shows you exactly how to jump in.&lt;/p&gt;

&lt;p&gt;No pressure. No gatekeeping.&lt;br&gt;
Just real ways to help. 💪&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💬 4. Feedback That Teaches, Not Scares&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The way you reject a PR defines your project more than how you merge it.&lt;/p&gt;

&lt;p&gt;Bad:&lt;br&gt;
✖️ “This is wrong.”&lt;/p&gt;

&lt;p&gt;Better:&lt;br&gt;
✔️ “Thanks for this! Let’s tweak it like this — here’s why…”&lt;/p&gt;

&lt;p&gt;Every comment is a moment to mentor. Don’t waste it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌱 The Secret? It’s Not About Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s about people helping people.&lt;/p&gt;

&lt;p&gt;Want your project to grow?&lt;br&gt;
Help someone grow through your project.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;💎 Real Projects Doing It Right&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;🟢 &lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js&lt;/a&gt;&lt;br&gt;
    • ✨ Clean documentation&lt;br&gt;
    • 🧠 Beginner sections&lt;br&gt;
    • 🫂 Supportive Discord &amp;amp; community&lt;/p&gt;

&lt;p&gt;🎨 &lt;a href="https://p5js.org/" rel="noopener noreferrer"&gt;p5.js&lt;/a&gt;&lt;br&gt;
    • 🧑‍🎓 Creative coding for learners&lt;br&gt;
    • 🌍 Focus on diversity&lt;br&gt;
    • 📦 Tons of beginner-friendly examples&lt;/p&gt;

&lt;p&gt;📊 &lt;a href="https://openrefine.org/" rel="noopener noreferrer"&gt;OpenRefine&lt;/a&gt;&lt;br&gt;
    • 🔍 Clear contribution docs&lt;br&gt;
    • 🤝 Active on forums&lt;br&gt;
    • 💬 Friendly PR feedback&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🌱 My First OSS Step&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;My journey began with helping a friend build a driving test app for foreigners in Thailand 🇹🇭&lt;br&gt;
He didn’t have time to finish — I jumped in.&lt;/p&gt;

&lt;p&gt;Later, we mentored a beginner dev together. It felt like real impact.&lt;/p&gt;

&lt;p&gt;Then I tried making a Vite plugin I needed — and published it.&lt;/p&gt;

&lt;p&gt;And people actually used it 💥&lt;br&gt;
My first stars. My first issue.&lt;br&gt;
It felt amazing.&lt;/p&gt;

&lt;p&gt;That led to more projects. More contributors.&lt;br&gt;
And eventually — my first PRs to React, Vite, and others.&lt;/p&gt;

&lt;p&gt;Now I mentor devs and help them start their journey.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎓 Tip: Take This Course&lt;br&gt;
📚 &lt;a href="https://www.coursera.org/specializations/oss-development-linux-git" rel="noopener noreferrer"&gt;Open Source Software Development on Coursera&lt;/a&gt;&lt;br&gt;
    • Clear, practical lessons&lt;br&gt;
    • OSS etiquette &amp;amp; licensing&lt;br&gt;
    • Real-world Git workflows&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you’re scared to start — this will help.&lt;/p&gt;




&lt;p&gt;🤔 &lt;strong&gt;And what about you?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I’d love to hear from &lt;em&gt;you&lt;/em&gt; — the readers.&lt;/p&gt;

&lt;h2&gt;
  
  
  🗳️ &lt;strong&gt;Have you ever contributed to open source?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Leave a comment with the emoji that matches you:&lt;/p&gt;

&lt;p&gt;💡 — I’ve contributed once or twice&lt;br&gt;&lt;br&gt;
🔧 — I contribute regularly&lt;br&gt;&lt;br&gt;
📚 — I help with docs, translations or community&lt;br&gt;&lt;br&gt;
🧍 — I use it but haven’t contributed yet&lt;br&gt;&lt;br&gt;
❓ — I want to, but don’t know how&lt;/p&gt;

&lt;p&gt;👇 Drop your emoji below!&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🏁 Final Words&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;🌍 Open source is how we build the internet.&lt;br&gt;
🤝 It’s also how we grow developers, communities, and ideas.&lt;/p&gt;

&lt;p&gt;You don’t need to be a genius. You just need to start small — and start together.&lt;/p&gt;

&lt;p&gt;✨ The world needs your code. But more importantly — it needs you.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;📚 Sources&lt;/strong&gt;&lt;br&gt;
    • &lt;a href="https://www.linuxfoundation.org/hubfs/LF%20Research/OSS_Developer_Report_2024.pdf" rel="noopener noreferrer"&gt;Linux Foundation OSS Developer Report (2024)&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://www.jetbrains.com/lp/devecosystem-2023/development/#contribute_os" rel="noopener noreferrer"&gt;JetBrains Developer Ecosystem Survey (2023)&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://www.bairesdev.com/blog/how-many-software-developers-in-the-world/" rel="noopener noreferrer"&gt;Evans Data Corporation (2024): Developer Population&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://octoverse.github.com/" rel="noopener noreferrer"&gt;GitHub Octoverse 2024 Highlights&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js Contribution Guide&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://p5js.org/community/" rel="noopener noreferrer"&gt;p5.js Community Docs&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://openrefine.org/" rel="noopener noreferrer"&gt;OpenRefine Contribution Guide&lt;/a&gt;&lt;br&gt;
    • &lt;a href="//goodfirstissue.dev"&gt;goodfirstissue.dev&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://firstcontributions.github.io/" rel="noopener noreferrer"&gt;First Contributions Project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>What’s New in vite-plugin-create v1.0.1 — Or How I Took Another Step Toward the Perfect Generator</title>
      <dc:creator>Dmitry Titov</dc:creator>
      <pubDate>Mon, 19 May 2025 01:54:38 +0000</pubDate>
      <link>https://dev.to/dimatitov/whats-new-in-vite-plugin-create-v101-or-how-i-took-another-step-toward-the-perfect-generator-3m0o</link>
      <guid>https://dev.to/dimatitov/whats-new-in-vite-plugin-create-v101-or-how-i-took-another-step-toward-the-perfect-generator-3m0o</guid>
      <description>&lt;h2&gt;
  
  
  🔥 Highlights of v1.0.1
&lt;/h2&gt;

&lt;p&gt;After releasing the first version of the plugin, I decided not to wait — and jumped straight into building out the roadmap.&lt;/p&gt;

&lt;p&gt;The new version of vite-plugin-create isn’t just about bug fixes. It’s a big leap toward full customization. Now you decide what you want to generate, how to name it, and what templates to use — all in a simple, intuitive way.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧱 Custom Generators
&lt;/h3&gt;

&lt;p&gt;You can now define your own generators in the config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"store"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"stores/{{name}}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/store/zustand.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want to scaffold Zustand stores? Redux slices? A new kind of widget? Go for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 Smarter init
&lt;/h3&gt;

&lt;p&gt;The npx vite-create init command now asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TypeScript or JavaScript?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And generates a config and template set that fits your stack. No extra files. No cleanup needed. Just your setup — ready to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 JSX / JS Support
&lt;/h3&gt;

&lt;p&gt;Working on a pure JavaScript project? No problem. Templates will now match your choice:&lt;br&gt;
•.jsx instead of .tsx&lt;br&gt;
•index.js instead of index.ts&lt;/p&gt;

&lt;p&gt;Everything just works.&lt;/p&gt;
&lt;h3&gt;
  
  
  🎨 Per-Generator Naming Styles
&lt;/h3&gt;

&lt;p&gt;Want your components in PascalCase, but your stores in camelCase? Easy.&lt;/p&gt;

&lt;p&gt;You can now configure the file naming style for each generator separately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"generators"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"component"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"components/{{name}}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"fileNameStyle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pascalCase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.tsx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/component.tsx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"index.ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/index.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.module.scss"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/style.scss"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"store"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"stores/{{name}}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"fileNameStyle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"camelCase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/store/zustand.ts"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🛠 How It Works
&lt;/h3&gt;

&lt;p&gt;Still dead simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx vite-create init
npx vite-create component MyButton
npx vite-create store userStore
npx vite-create custom whatever
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All templates live in the templates/ directory and support Handlebars variables like {{name}}, {{PascalCaseName}}, and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌱 What’s Next
&lt;/h3&gt;

&lt;p&gt;Here’s where we’re headed:&lt;br&gt;
•🧩 A visual UI to generate and edit your config&lt;br&gt;
•🧪 A playground site with live docs and preview&lt;br&gt;
•🛠️ CLI wizard for adding new generators without manually editing JSON&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Plop.js is a powerful tool. We drew inspiration from it. But vite-plugin-create is about simplicity. About zero-config onboarding. About getting up and running with your own templates, your own generators, and working commands — in under a minute.&lt;/p&gt;

&lt;p&gt;If you’re tired of boilerplate and want more control with less effort — give vite-plugin-create a spin.&lt;/p&gt;

&lt;p&gt;I’d love to hear your feedback and ideas. I read everything.&lt;/p&gt;

&lt;p&gt;And hey — see you in the terminal.&lt;/p&gt;

&lt;p&gt;📦 &lt;a href="https://github.com/dimatitov/vite-plugin-create" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
📥 &lt;a href="https://www.npmjs.com/package/vite-plugin-create" rel="noopener noreferrer"&gt;vite-plugin-create on npm&lt;/a&gt;&lt;br&gt;
📝 Original article: &lt;a href="https://dev.to/dimatitov/what-if-vite-had-its-own-nest-g-now-it-does-2iji"&gt;How I built a code generator for Vite&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>vite</category>
      <category>react</category>
    </item>
    <item>
      <title>What if Vite had its own nest g? Now it does!</title>
      <dc:creator>Dmitry Titov</dc:creator>
      <pubDate>Mon, 12 May 2025 03:01:02 +0000</pubDate>
      <link>https://dev.to/dimatitov/what-if-vite-had-its-own-nest-g-now-it-does-2iji</link>
      <guid>https://dev.to/dimatitov/what-if-vite-had-its-own-nest-g-now-it-does-2iji</guid>
      <description>&lt;h2&gt;
  
  
  🚀 vite-plugin-create just got a fresh update — v1.1.1 is live!
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;🧩 You can now:&lt;br&gt;
– Generate standalone files (perfect for hooks, utils, etc.)&lt;br&gt;
– Assign a custom basePath for each generator&lt;br&gt;
It’s a small but powerful step toward more flexible scaffolding.&lt;br&gt;
👉 See what’s new: &lt;a href="https://github.com/dimatitov/vite-plugin-create/releases/tag/1.1.1" rel="noopener noreferrer"&gt;https://github.com/dimatitov/vite-plugin-create/releases/tag/1.1.1&lt;/a&gt;&lt;br&gt;
Feedback and ideas are always welcome — let’s make Vite development faster together 💪&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  📢 Update — v1.0.1 is out now!
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The new version includes: custom generators, JS/TS template support, per-generator naming styles, and more. 👉 &lt;a href="https://dev.to/dimatitov/whats-new-in-vite-plugin-create-v101-or-how-i-took-another-step-toward-the-perfect-generator-3m0o"&gt;Check out the new features and see examples&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I’ve only recently started sharing articles and documentation publicly.&lt;/p&gt;

&lt;p&gt;Previously, all my writing was internal — release notes, docs, research, roadmaps — all within teams.&lt;/p&gt;

&lt;p&gt;But after publishing my first Vite plugin, I felt the need to share it with the world. To get feedback. To see if anyone would find it useful. Maybe someone would suggest a feature, spot a bug — or just say “thanks.”&lt;/p&gt;

&lt;p&gt;And while writing about it, I realized something: I enjoy this. I was already thinking about the next topic. But let’s get back to the plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It All Started: Inspired by NestJS
&lt;/h2&gt;

&lt;p&gt;I’ve been a developer for over 5 years — mostly frontend, but I’ve been getting into backend recently too.&lt;/p&gt;

&lt;p&gt;It started with Node.js + Express, and then, at work, we launched a project to automate voice calls and analyze transcripts using OpenAI. I chose to build it with NestJS. I was only mildly familiar with it, but had to dive deep.&lt;/p&gt;

&lt;p&gt;And then, I ran:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nest g resource&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;…and boom — a full module appeared.&lt;/p&gt;

&lt;p&gt;I literally said out loud:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Why doesn’t React have something like this?!”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes, there are snippets. Yes, some third-party generators exist. But I wanted structure.&lt;/p&gt;

&lt;p&gt;I wanted to type a command — and get a scaffolded component. Just like Nest.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Frontend Pain
&lt;/h2&gt;

&lt;p&gt;Back to a new internal project: a Telegram Web App using &lt;code&gt;Vite + TypeScript + React + Zustand&lt;/code&gt;. A simple, small app.&lt;/p&gt;

&lt;p&gt;I start coding, and suddenly I’m back at it again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a folder&lt;/li&gt;
&lt;li&gt;Create Component.tsx&lt;/li&gt;
&lt;li&gt;Add index.ts&lt;/li&gt;
&lt;li&gt;Add props interface&lt;/li&gt;
&lt;li&gt;Import styles&lt;/li&gt;
&lt;li&gt;…and repeat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Eventually, a new page design landed — and I had to do it all over again.&lt;/p&gt;

&lt;p&gt;My eye started twitching.&lt;/p&gt;

&lt;p&gt;So I wrote a bash script. It scaffolded everything I needed. Made it executable. Called it create-component.&lt;/p&gt;

&lt;p&gt;And you know what? I was &lt;em&gt;so happy&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Then came create-store, create-page, and so on. Life got easier.&lt;/p&gt;

&lt;p&gt;But there were still problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every project has slightly different templates&lt;/li&gt;
&lt;li&gt;Folder structure varies&lt;/li&gt;
&lt;li&gt;Sometimes you need something custom — and have to rewrite the script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Especially on legacy projects — one had Angular 1.5 &lt;em&gt;and&lt;/em&gt; React mixed in 😵‍💫&lt;/p&gt;

&lt;p&gt;Don’t ask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vite Deserves nest g&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One day I thought:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“I love Vite. Why not build something like nest g resource — customizable and extensible — for it?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And so vite-plugin-create was born.&lt;/p&gt;

&lt;p&gt;A plugin + CLI to quickly generate components, pages, stores, whatever — from your own templates.&lt;/p&gt;

&lt;p&gt;Naming? Customizable. Templates? Yours. Command? One.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building It: Not As Easy As I Thought
&lt;/h2&gt;

&lt;p&gt;I first warmed up with a simple plugin: &lt;a href="https://www.npmjs.com/package/vite-plugin-create" rel="noopener noreferrer"&gt;vite-plugin-import-alias&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It was smaller in scope, helped me get used to publishing, npm, docs, and user feedback.&lt;/p&gt;

&lt;p&gt;But I already knew what the next one would be: vite-plugin-create.&lt;/p&gt;

&lt;p&gt;The idea looked simple at first. I had my bash scripts. Why not repeat the same logic, just cleaner?&lt;/p&gt;

&lt;p&gt;I imagined:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Templates for files&lt;/li&gt;
&lt;li&gt;A config to define structure, names, and naming styles&lt;/li&gt;
&lt;li&gt;Catch a CLI command like vite create:component Button — and scaffold away&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  But then came the disappointment
&lt;/h2&gt;

&lt;p&gt;Turns out, Vite has &lt;strong&gt;no API&lt;/strong&gt; to add custom CLI commands.&lt;/p&gt;

&lt;p&gt;So vite create:component? Not possible. I really wanted it to feel native, like nest g, but no luck.&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution: a custom CLI
&lt;/h2&gt;

&lt;p&gt;I added bin/cli.ts, defined commands, and in package.json:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"bin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"vite-create"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./dist/bin/cli.js"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, everything runs via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx vite-create component Button
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not &lt;em&gt;exactly&lt;/em&gt; part of Vite’s CLI, but clean, stable, and simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  Config &amp;amp; Naming
&lt;/h2&gt;

&lt;p&gt;Next step: how should names be formatted?&lt;/p&gt;

&lt;p&gt;Components should be PascalCase — but stores or utils? Maybe camelCase or kebab-case.&lt;/p&gt;

&lt;p&gt;So I added a fileNameStyle option in the config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pascalCase&lt;/li&gt;
&lt;li&gt;camelCase&lt;/li&gt;
&lt;li&gt;kebabCase&lt;/li&gt;
&lt;li&gt;original (leave as typed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Default is PascalCase, but I plan to let each generator (component, store, etc.) have its own style.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Config &amp;amp; Templates
&lt;/h2&gt;

&lt;p&gt;One of my goals: &lt;strong&gt;make it dead simple&lt;/strong&gt; and easy to customize.&lt;/p&gt;

&lt;p&gt;You shouldn’t need to guess:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Where do templates go?”&lt;br&gt;
“What format should config be?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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;npx vite-create init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It creates:&lt;/p&gt;

&lt;p&gt;templates/ with a base component&lt;br&gt;
vite-create.config.json with a working example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"defaultPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"fileNameStyle"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pascalCase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"generators"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"component"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"components/{{name}}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.tsx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/component.tsx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"index.ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/index.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"{{name}}.module.scss"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"templates/component/style.scss"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Templates are just .tsx, .ts, .scss files with Handlebars variables like {{name}}, {{PascalCaseName}}, etc.&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;styles&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./{{name}}.module.scss&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="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Props&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;className&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}}:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FC&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Props&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;className&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;root&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="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What vite-plugin-create Can Do (Right Now)
&lt;/h2&gt;

&lt;p&gt;✅ Scaffold any component (or entity) from your templates&lt;/p&gt;

&lt;p&gt;✅ Supports .tsx, .scss, .test.tsx, or whatever you want&lt;/p&gt;

&lt;p&gt;✅ Works with any naming convention&lt;/p&gt;

&lt;p&gt;✅ Lets you define custom generators, like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx vite-create store userStore

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or anything you define in the config.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛣 Roadmap
&lt;/h2&gt;

&lt;p&gt;Here’s what I’m planning next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Full support for custom generators&lt;/li&gt;
&lt;li&gt;🔀 Choose default format: .tsx or .jsx (maybe via — jsx flag)&lt;/li&gt;
&lt;li&gt;📁 Template groups — e.g. pages/, widgets/, shared/&lt;/li&gt;
&lt;li&gt;⚙️ Per-generator naming style (e.g. PascalCase for components, camelCase for hooks)&lt;/li&gt;
&lt;li&gt;🧰 Possibly: a minimal GUI to edit your config visually — in browser or CLI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re tired of boilerplate and repetitive component creation — give &lt;a href="https://www.npmjs.com/package/vite-plugin-create" rel="noopener noreferrer"&gt;vite-plugin-create&lt;/a&gt; a try.&lt;/p&gt;

&lt;p&gt;Feedback, ideas, PRs — all welcome.&lt;/p&gt;

&lt;p&gt;MIT licensed. Open source. Built with ❤️&lt;/p&gt;

</description>
      <category>vite</category>
      <category>react</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>My First Vite Plugin: vite-plugin-module-alias</title>
      <dc:creator>Dmitry Titov</dc:creator>
      <pubDate>Sat, 10 May 2025 19:42:44 +0000</pubDate>
      <link>https://dev.to/dimatitov/my-first-vite-plugin-vite-plugin-module-alia-2afp</link>
      <guid>https://dev.to/dimatitov/my-first-vite-plugin-vite-plugin-module-alia-2afp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;A small tool I built to automate alias config in Vite. Also, my first dev post — feedback is welcome!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🧠 Background
&lt;/h2&gt;

&lt;p&gt;While working on a Telegram bot using a Web App, I chose a familiar stack: &lt;code&gt;Vite + React + Zustand + TypeScript&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Coming from a Webpack background, I found Vite’s &lt;code&gt;resolve.alias&lt;/code&gt; handy. But there was a catch: to make TypeScript and my IDE understand the aliases, I also had to configure &lt;code&gt;tsconfig.json&lt;/code&gt;. And that wasn’t all — HTML imports didn’t recognize aliases either.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Why Do We Need Aliases in HTML?
&lt;/h2&gt;

&lt;p&gt;Using path aliases in JavaScript/TypeScript (like &lt;code&gt;@components/Button&lt;/code&gt; instead of &lt;code&gt;../../components/Button&lt;/code&gt;) makes your code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More readable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Less fragile&lt;/strong&gt; to file structure changes&lt;/li&gt;
&lt;li&gt;Easier to maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Vite, even if you configure aliases in &lt;code&gt;vite.config.ts&lt;/code&gt; and &lt;code&gt;tsconfig.json&lt;/code&gt;, these aliases &lt;strong&gt;don’t work in &lt;code&gt;index.html&lt;/code&gt;&lt;/strong&gt; — for example, in &lt;code&gt;&amp;lt;script type="module"&amp;gt;&lt;/code&gt; tags — because the browser doesn’t know anything about your bundler’s internal setup.&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;import maps&lt;/strong&gt; come in. They allow you to declare aliases directly in HTML so the browser can resolve them correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"importmap"&lt;/span&gt;&lt;span class="nt"&gt;&amp;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;imports&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;@utils/&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;/src/utils/&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way, your aliases work not only in your source code but also in HTML — no hacks or fragile absolute paths.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔁 Repeating Myself, Again and Again…
&lt;/h2&gt;

&lt;p&gt;Every time I spun up a new Vite project, I found myself writing the same boilerplate alias configs.&lt;/p&gt;

&lt;p&gt;So I thought: &lt;strong&gt;why not automate it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s how the idea for a plugin was born — simple, reusable, and driven by a single source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  🗂️ Why an import-map.json?
&lt;/h2&gt;

&lt;p&gt;I wanted something dead simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to replicate across projects&lt;/li&gt;
&lt;li&gt;No need to configure aliases in 3 different files&lt;/li&gt;
&lt;li&gt;Just drop in one config file and you’re good to go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I started with a minimal setup that read from import-map.json, applied aliases via resolve.alias, and injected the &lt;code&gt;&amp;lt;script type="importmap"&amp;gt;&lt;/code&gt; tag into HTML — making aliases work even in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤔 Why Not Use Existing Plugins?
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;vite-tsconfig-paths&lt;/u&gt; is a popular plugin that automatically picks up aliases from your tsconfig.json.&lt;/p&gt;

&lt;p&gt;At first glance, it sounds perfect — but there are a few limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ It does not support aliases in HTML — so your &lt;code&gt;index.html&lt;/code&gt; scripts still break unless you manually fix the paths.&lt;/li&gt;
&lt;li&gt;❌ It depends on &lt;code&gt;tsconfig.json&lt;/code&gt; as the single source of truth:

&lt;ul&gt;
&lt;li&gt;Breaks the idea of centralized config if you also need &lt;code&gt;vite.config.ts&lt;/code&gt; and import maps&lt;/li&gt;
&lt;li&gt;Limits flexibility, especially in template projects or shared configurations&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;❌ There’s no built-in way to auto-update &lt;code&gt;tsconfig.json&lt;/code&gt; when your aliases change — you still have to maintain it manually.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I really wanted was:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;single config file&lt;/strong&gt; (like import-map.json),&lt;/li&gt;
&lt;li&gt;consistent aliasing in both dev and production,&lt;/li&gt;
&lt;li&gt;HTML support out of the box,&lt;/li&gt;
&lt;li&gt;and zero setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s exactly what I built with vite-plugin-module-alias.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Publishing a Plugin for the First Time
&lt;/h2&gt;

&lt;p&gt;I’d never published a plugin to npm before. Honestly, I didn’t think anyone would care.&lt;/p&gt;

&lt;p&gt;But this time, I thought — &lt;em&gt;what if someone finds it useful?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I cleaned up the code, wrote a quick README, and pushed it to npm.&lt;/p&gt;

&lt;p&gt;To my surprise, within a day or two I saw &lt;strong&gt;80+ downloads.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cool! …Except it had two critical bugs 🙃&lt;/p&gt;

&lt;h2&gt;
  
  
  🧯 Lesson Learned: Don’t Ship at Night
&lt;/h2&gt;

&lt;p&gt;I made a rookie mistake — released the plugin in the evening with the classic “I’ll fix the rest tomorrow” mindset.&lt;/p&gt;

&lt;p&gt;Turns out, “tomorrow” was too late.&lt;/p&gt;

&lt;p&gt;Spent 8–10 hours cleaning it up, fixing bugs, improving error messages and docs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Don’t publish unless it’s rock solid.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🔄 Second Iteration: &lt;code&gt;tsconfig.json&lt;/code&gt; Auto-Sync
&lt;/h2&gt;

&lt;p&gt;The next logical step was syncing aliases to tsconfig.json automatically.&lt;/p&gt;

&lt;p&gt;I experimented with Vite’s server.restart() to reload the dev server, but it wasn’t reliable. So I added two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto&lt;/strong&gt; – plugin attempts to restart the server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual&lt;/strong&gt; – shows a warning to restart it yourself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also had to deal with relative vs absolute paths, JSON formatting, and edge cases.&lt;br&gt;
Big thanks to my small group of early testers (you know who you are!).&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 My First GitHub Issue 🎉
&lt;/h2&gt;

&lt;p&gt;One day I got a GitHub notification — my first issue!&lt;/p&gt;

&lt;p&gt;It felt like a milestone.&lt;/p&gt;

&lt;p&gt;Luckily, it was a small bug and only took 10 minutes to fix. But seeing someone using the thing — and caring enough to give feedback — was amazing.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧱 The Unresolved Bit: JSON Comments
&lt;/h2&gt;

&lt;p&gt;One challenge remains: preserving comments in &lt;code&gt;tsconfig.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Standard JSON parsers strip them, and I haven’t found a reliable workaround yet. I’m still experimenting with different solutions.&lt;/p&gt;

&lt;p&gt;If you know of a solid fix — PRs welcome 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  🔭 What’s Next?
&lt;/h2&gt;

&lt;p&gt;I’m planning to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improve documentation&lt;/li&gt;
&lt;li&gt;Add better error handling and validation&lt;/li&gt;
&lt;li&gt;Maybe support YAML configs?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/dimatitov/vite-plugin-import-map" rel="noopener noreferrer"&gt;vite-plugin-module-alias&lt;/a&gt;&lt;br&gt;
📦 npm: &lt;a href="https://www.npmjs.com/package/vite-plugin-module-alias" rel="noopener noreferrer"&gt;vite-plugin-module-alias&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vite</category>
      <category>react</category>
      <category>viteplugin</category>
    </item>
  </channel>
</rss>
