tiny-vue/internals/unplugin-virtual-template
Gweesin Chan 403fea7e0e
fix: fix build internals error in node v18.19.1 (#1676)
2024-06-27 16:16:19 +08:00
..
scripts feat: add dialog-select and refactor sites (#378) 2023-08-11 16:40:06 +08:00
src fix(components): fix some bugs (#1148) 2023-12-15 15:20:45 +08:00
test feat: add dialog-select and refactor sites (#378) 2023-08-11 16:40:06 +08:00
README.md Refactor project to Monorepo and TypeScript (#90) 2023-03-28 20:37:18 +08:00
package.json fix: fix build internals error in node v18.19.1 (#1676) 2024-06-27 16:16:19 +08:00
tsconfig.json Refactor project to Monorepo and TypeScript (#90) 2023-03-28 20:37:18 +08:00
tsup.config.ts feat: add dialog-select and refactor sites (#378) 2023-08-11 16:40:06 +08:00

README.md

@opentiny/unplugin-virtual-template

Install

npm i @opentiny/unplugin-virtual-template
Vite
// vite.config.ts
import Starter from '@opentiny/unplugin-virtual-template/vite'

export default defineConfig({
  plugins: [
    Starter({ /* options */ }),
  ],
})

Example: playground/


Rollup
// rollup.config.js
import Starter from '@opentiny/unplugin-virtual-template/rollup'

export default {
  plugins: [
    Starter({ /* options */ }),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('@opentiny/unplugin-virtual-template/webpack')({ /* options */ })
  ]
}


Nuxt
// nuxt.config.js
export default {
  buildModules: [
    ['@opentiny/unplugin-virtual-template/nuxt', { /* options */ }],
  ],
}

This module works for both Nuxt 2 and Nuxt Vite


Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('@opentiny/unplugin-virtual-template/webpack')({ /* options */ }),
    ],
  },
}


esbuild
// esbuild.config.js
import { build } from 'esbuild'
import Starter from '@opentiny/unplugin-virtual-template/esbuild'

build({
  plugins: [Starter()],
})