1.0.1 • Published 2 years ago

vite-plugin-diff-compiler v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Install

npm install vite-plugin-diff-compiler -D

Usage

// package.json
{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "dev:h5": "vite -m h5",
    "build:h5": "vite build -m h5"
  }
}
// vite.config.js
import { defineConfig } from 'vite'
import DiffCompiler from 'vite-plugin-diff-compiler'

export default defineConfig({
  plugins: [
    DiffCompiler(),
  ],
})
// only run `pnpm dev:h5` or `pnpm build:h5` will compile the code below

// #diff-compiler-start: h5
console.log('h5')
// #diff-compiler-end: h5