0.0.1 • Published 7 months ago
unplugin-assets-preview v0.0.1
unplugin-assets-preview
Starter template for unplugin.
Template Usage
To use this template, clone it down using:
npx degit unplugin/unplugin-assets-preview my-unplugin
And do a global replacement of unplugin-assets-preview
with your plugin name.
Then you can start developing your unplugin 🔥
To test your plugin, run: pnpm run dev
To release a new version, run: pnpm run release
Install
npm i unplugin-assets-preview
// vite.config.ts
import Starter from 'unplugin-assets-preview/vite'
export default defineConfig({
plugins: [
Starter({ /* options */ }),
],
})
Example: playground/
// rollup.config.js
import Starter from 'unplugin-assets-preview/rollup'
export default {
plugins: [
Starter({ /* options */ }),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-assets-preview/webpack')({ /* options */ })
]
}
// nuxt.config.js
export default defineNuxtConfig({
modules: [
['unplugin-assets-preview/nuxt', { /* options */ }],
],
})
This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-assets-preview/webpack')({ /* options */ }),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-assets-preview/esbuild'
build({
plugins: [Starter()],
})
0.0.1
7 months ago