@farmfe/js-plugin-vue
v3.13.0
Published
support vue sfc for farm.
Readme
Vue Js Plugin for Farm
Support compiling Vue SFC in Farm.
Usage
Install @farmfe/js-plugin-vue by your favorite package manager(npm, yarn, pnpm and so on):
npm i @farmfe/js-plugin-vue --save-dev # or pnpm/yarn add @farmfe/js-plugin-vue -DConfiguring the plugin in farm.config.ts:
import { defineFarmConfig } from '@farmfe/core/dist/config';
import farmJsPluginVue from '@farmfe/js-plugin-vue'; // import the plugin
export default defineFarmConfig({
compilation: {
input: {
index: './index.html'
},
output: {
path: './build'
}
},
plugins: [
// use the vue plugin.
farmJsPluginVue({
// custom options here
})
]
});Options
hmr
- Type:
boolean - Default:
false
Determine whether to enable hot module replace
If not set, it is considered to be true in development mode.
ssr
- Type:
boolean - Default:
false
When set to true, it will disable compilation.lazyCompilation and server.hmr.
