Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
feat: support pass options for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Jul 14, 2020
1 parent 21a6515 commit 3041c2d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion playground/vite.config.js
@@ -1,7 +1,7 @@
const vitePluginVue2 = require('../dist')

const config = {
plugins: [vitePluginVue2]
plugins: [vitePluginVue2()],
}

export default config
16 changes: 9 additions & 7 deletions src/index.ts
@@ -1,11 +1,13 @@
import { resolver } from './resolver'
import { vuePlugin } from './serverPlugin'

export = {
resolvers: [resolver],
configureServer: vuePlugin,
enableRollupPluginVue: false,
rollupInputOptions: {
plugins: [require('rollup-plugin-vue')({})],
},
export = function createVuePlugin(options = {}) {
return {
resolvers: [resolver],
configureServer: vuePlugin,
enableRollupPluginVue: false,
rollupInputOptions: {
plugins: [require('rollup-plugin-vue')({})],
},
}
}

0 comments on commit 3041c2d

Please sign in to comment.