1.0.1 • Published 3 years ago
vite-plugin-diff-compiler v1.0.1
Install
npm install vite-plugin-diff-compiler -DUsage
// 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