Adds support for .vue
files, using Vue 3 SFC compiler.
Also enables Hot Reloading for Vue Components.
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()
]
})
import Component from './file.vue';
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')
})
]
})
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.
Licensed under the MIT License.