# @opentiny/unplugin-virtual-template
## Install
```bash
npm i @opentiny/unplugin-virtual-template
```
Vite
```ts
// vite.config.ts
import Starter from '@opentiny/unplugin-virtual-template/vite'
export default defineConfig({
plugins: [
Starter({ /* options */ }),
],
})
```
Example: [`playground/`](./playground/)
Rollup
```ts
// rollup.config.js
import Starter from '@opentiny/unplugin-virtual-template/rollup'
export default {
plugins: [
Starter({ /* options */ }),
],
}
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('@opentiny/unplugin-virtual-template/webpack')({ /* options */ })
]
}
```
Nuxt
```ts
// nuxt.config.js
export default {
buildModules: [
['@opentiny/unplugin-virtual-template/nuxt', { /* options */ }],
],
}
```
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
Vue CLI
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('@opentiny/unplugin-virtual-template/webpack')({ /* options */ }),
],
},
}
```
esbuild
```ts
// esbuild.config.js
import { build } from 'esbuild'
import Starter from '@opentiny/unplugin-virtual-template/esbuild'
build({
plugins: [Starter()],
})
```