1.1.3 • Published 3 years ago
@view-launcher/rollup-plugin v1.1.3
@view-launcher/rollup-plugin
Rollup/Vite plugin for Vue.js SFC. Must be used along with rollup-plugin-vue.
Usage
Installation
npm i @view-launcher/rollup-plugin -D
Example rollup.config.js
import path from 'path'
import VuePlugin from 'rollup-plugin-vue'
import ViewLauncherVuePlugin from '@view-launcher/rollup-plugin'
const entryFile = path.resolve(__dirname, 'src/main.js')
const viewLauncherOptions = {
entry: entryFile,
theme: 'light'
}
export default {
input: entryFile,
output: {
file: `./dist/main.js`,
format: 'esm',
},
plugins: [
ViewLauncherVuePlugin(viewLauncherOptions),
VuePlugin()
],
external: ['vue'],
}
Be sure that place this plugin after rollup-plugin-vue
.
Example(Vite) vite.config.js
import path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ViewLauncherVuePlugin from '@view-launcher/rollup-plugin'
const entryFile = path.resolve(__dirname, 'src/main.js')
const viewLauncherOptions = {
entry: entryFile,
theme: 'light'
}
export default defineConfig({
plugins: [
ViewLauncherVuePlugin(viewLauncherOptions),
vue()
],
})
Be sure that place this plugin after @vitejs/plugin-vue
.