@reboost/plugin-vue

Vue plugin for Reboost
1,144 60
Install
npm install @reboost/plugin-vue
Latest Version:0.21.0
License:MIT
Last Updated:Mar 5, 2023
Links: GitHub  ·  npm
Maintainer: sarsamurmu

npm license

Vue Plugin

Adds support for .vue files, using Vue 3 SFC compiler. Also enables Hot Reloading for Vue Components.

Usage

Setup

Install it using npm

npm i -D @reboost/plugin-vue

Import it from the package

const { start } = require('reboost');
const VuePlugin = require('@reboost/plugin-vue');

Add it to the plugins array

const { start } = require('reboost');
const VuePlugin = require('@reboost/plugin-vue');

start({
  plugins: [
    VuePlugin()
  ]
})

Require file in your code

import Component from './file.vue';

Options

compiler

Type: object

Compiler to use when compiling SFCs. You may need it if you want to use a different version of the SFC compiler than the one which comes with this package. First, install the version of the compiler you want to use then pass it to the options. Like so

const { start } = require('reboost');
const VuePlugin = require('@reboost/plugin-vue');

start({
  plugins: [
    VuePlugin({
      // Install the version of the compiler you want
      // then pass it to the plugin
      compiler: require('@vue/compiler-sfc')
    })
  ]
})

Why Vue 2 is not supported

Vue 2 uses the with statement in its code, but the with statement is forbidden in ES modules and strict mode. And because Reboost uses native ES modules, with statements will give an error. That's why Vue 2 is not supported.

License

Licensed under the MIT License.

Related Packages

@21cnfe/onekit-mp-cli

小程序框架开发工具

1,063
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0
@lg2/nuxt3-plugin-link-resolver

link resolver plugin fro nuxt3

3,544 0

Version History

Version Released License
0.21.0 MIT
0.20.1 MIT
0.20.0 MIT
0.19.2 MIT
0.19.1 MIT