1.1.3 • Published 3 years ago

@view-launcher/rollup-plugin v1.1.3

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

@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.

1.1.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago