0.0.6 • Published 12 months ago

@cmmv/plugin-vite v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Description

@cmmv/plugin-vite is a simple Vite plugin designed for handling .cmmv template files. It enables basic parsing and loading of templates, scripts, and styles, similar to Vue's SFC (Single File Component) format, but with a reduced scope tailored for lightweight component handling.

This plugin was inspired by the vite-plugin-vue and allows for easy integration of .cmmv files in Vite projects, focusing on simplicity and performance for component-based development.

Installation

$ pnpm add -D @cmmv/plugin-vite

Usage

// vite.config.js
import cmmvPlugin from '@cmmv/plugin-vite'

export default {
  plugins: [cmmvPlugin()],
}

Example .cmmv File

<template>
  <div>{{ message }}</div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello CMMV!'
    };
  }
};
</script>

<style>
div {
  color: blue;
}
</style>
0.0.3

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

12 months ago

0.0.2

1 year ago

0.0.1

1 year ago