setupin

Vue SFC? HTML! in html
2,012 8
Install
npm install setupin
Latest Version:3.3.1
Older releases:3
License:MIT
Last Updated:Mar 18, 2026
Links: GitHub  ·  npm
Maintainer: tofu_xx

English | 简体中文

😏 What is a setupin?

setupin allows you to use Vue SFC syntax in HTML.

Using the sfc2esm, which compiled at runtime for esm vue code format, and dynamic execution.

🤯 Code comparison

esm.html

vue esm is complicated to write

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>esm</title>
  <style>
    button {
      font-size: larger;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="count++">{{ count }}</button>
  </div>

  <script type="module">
    import { createApp, defineComponent, ref } from 'https://unpkg.com/vue/dist/vue.esm-browser.js';
    const App = defineComponent(() => {
      const count = ref(0);
      return {
        count
      };
    });
    createApp(App).mount('#app')
  </script>
</body>
</html>
setup.vue

vue sfc needs to be compiled

<script setup>
  import { ref } from 'vue'
  const count = ref(0)
</script>

<template>
  <button @click="count++">{{ count }}</button>
</template>

<style>
  button {
    font-size: larger;
  }
</style>
setupin.html

setupin brings it all together

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>setupin</title>
  <script src="https://unpkg.com/setupin"></script>
</head>

<script setup>
  import { ref } from 'vue'
  const count = ref(0)
</script>

<template>
  <button @click="count++">{{ count }}</button>
</template>

<style>
  button {
    font-size: larger;
  }
</style>

It's exactly the same as Vue SFC except for the <head>

🤓 Characteristics

🤔 Why setupin

  1. Easy to learn Offer a friendly environment for beginners to easily grasp the core usage of Vue.
  2. Simple development Provide a convenient way to rapidly develop small webpage without complex configurations.
  3. Quick experience Allow users to quickly experiment with Vue's new features in HTML and feel its charm.

😝 Playground

try it on stackblitz !

🥰 Usage

<!-- The default is the dev version -->
<script src="https://unpkg.com/setupin"></script>

<!-- dev -->
<script src="https://unpkg.com/setupin/dist/main.js"></script>

<!-- prod -->
<script src="https://unpkg.com/setupin/dist/main.prod.js"></script>

Related Packages

j-vue

.vue single-file component back-end compiler. Belong to "Plan J"./.vue 单文件组...

6,068 7
@vue/component-compiler

bundler agnostic API for compiling Vue SFC

3,126,609 343
@vuedx/compiler-sfc

This package extracts `parse()` function [@vue/compiler-sfc] as ES module.

250,768 1,251
@processmaker/vue-form-elements

Reusable VueJS Based Form Elements styled with Bootstrap 4

48,893
vue-markup

markdown + support components for Vue.js

17,321 0

Version History

Version Released Vue License
3.3.1 MIT
3.3.0 MIT
3.2.0 MIT
3.1.2 MIT
3.1.1 MIT
Pre-releases (5)
Version Released Vue License
3.3.0-beta.1 MIT
3.0.0-beta.2 ^3.5.12 MIT
2.6.2-beta.1 ^3.5.12 MIT
2.5.0-beta.2 ^3.5.12 MIT
2.5.0-beta.1 ^3.5.12 MIT