|
| 1 | +# unplugin-vue-jsx-vapor |
| 2 | + |
| 3 | +[](https://www.npmjs.com/package/unplugin-vue-jsx-vapor) |
| 4 | + |
| 5 | +Starter template for [unplugin](https://github.com/unjs/unplugin). |
| 6 | + |
| 7 | +## Template Usage |
| 8 | + |
| 9 | +To use this template, clone it down using: |
| 10 | + |
| 11 | +```bash |
| 12 | +npx degit unplugin/unplugin-vue-jsx-vapor my-unplugin |
| 13 | +``` |
| 14 | + |
| 15 | +And do a global replacement of `unplugin-vue-jsx-vapor` with your plugin name. |
| 16 | + |
| 17 | +Then you can start developing your unplugin 🔥 |
| 18 | + |
| 19 | +To test your plugin, run: `pnpm run dev` |
| 20 | +To release a new version, run: `pnpm run release` |
| 21 | + |
| 22 | +## Install |
| 23 | + |
| 24 | +```bash |
| 25 | +npm i unplugin-vue-jsx-vapor |
| 26 | +``` |
| 27 | + |
| 28 | +<details> |
| 29 | +<summary>Vite</summary><br> |
| 30 | + |
| 31 | +```ts |
| 32 | +// vite.config.ts |
| 33 | +import Starter from 'unplugin-vue-jsx-vapor/vite' |
| 34 | + |
| 35 | +export default defineConfig({ |
| 36 | + plugins: [ |
| 37 | + Starter({ /* options */ }), |
| 38 | + ], |
| 39 | +}) |
| 40 | +``` |
| 41 | + |
| 42 | +Example: [`playground/`](./playground/) |
| 43 | + |
| 44 | +<br></details> |
| 45 | + |
| 46 | +<details> |
| 47 | +<summary>Rollup</summary><br> |
| 48 | + |
| 49 | +```ts |
| 50 | +// rollup.config.js |
| 51 | +import Starter from 'unplugin-vue-jsx-vapor/rollup' |
| 52 | + |
| 53 | +export default { |
| 54 | + plugins: [ |
| 55 | + Starter({ /* options */ }), |
| 56 | + ], |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +<br></details> |
| 61 | + |
| 62 | + |
| 63 | +<details> |
| 64 | +<summary>Webpack</summary><br> |
| 65 | + |
| 66 | +```ts |
| 67 | +// webpack.config.js |
| 68 | +module.exports = { |
| 69 | + /* ... */ |
| 70 | + plugins: [ |
| 71 | + require('unplugin-vue-jsx-vapor/webpack')({ /* options */ }) |
| 72 | + ] |
| 73 | +} |
| 74 | +``` |
| 75 | + |
| 76 | +<br></details> |
| 77 | + |
| 78 | +<details> |
| 79 | +<summary>Nuxt</summary><br> |
| 80 | + |
| 81 | +```ts |
| 82 | +// nuxt.config.js |
| 83 | +export default defineNuxtConfig({ |
| 84 | + modules: [ |
| 85 | + ['unplugin-vue-jsx-vapor/nuxt', { /* options */ }], |
| 86 | + ], |
| 87 | +}) |
| 88 | +``` |
| 89 | + |
| 90 | +> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite) |
| 91 | +
|
| 92 | +<br></details> |
| 93 | + |
| 94 | +<details> |
| 95 | +<summary>Vue CLI</summary><br> |
| 96 | + |
| 97 | +```ts |
| 98 | +// vue.config.js |
| 99 | +module.exports = { |
| 100 | + configureWebpack: { |
| 101 | + plugins: [ |
| 102 | + require('unplugin-vue-jsx-vapor/webpack')({ /* options */ }), |
| 103 | + ], |
| 104 | + }, |
| 105 | +} |
| 106 | +``` |
| 107 | + |
| 108 | +<br></details> |
| 109 | + |
| 110 | +<details> |
| 111 | +<summary>esbuild</summary><br> |
| 112 | + |
| 113 | +```ts |
| 114 | +// esbuild.config.js |
| 115 | +import { build } from 'esbuild' |
| 116 | +import Starter from 'unplugin-vue-jsx-vapor/esbuild' |
| 117 | + |
| 118 | +build({ |
| 119 | + plugins: [Starter()], |
| 120 | +}) |
| 121 | +``` |
| 122 | + |
| 123 | +<br></details> |
0 commit comments