fisx-parser-vue
A fisx parser to compile the vue single file component support vue1 and vue2.
How to use
Install
npm install fisx-parser-vue --save-dev
Add configure to fis-conf.js
// using vue1fisparser = ; // using vue2// fis.require('parser-vue').parser = require('fisx-vue-loader'); fis;
-
For Vue 1.x parser using fisx-vue1-loader
-
For Vue 2.x parser using fisx-vue-loader
If you using babel-plugin-external-helpers
plugin, you can use fisx-preprocessor-babel and fisx-prepackager-babel plugins. If the module style is commonjs
, you can use fisx-preprocessor-amd preprocessor to convert to amd module style.
Options
-
styleNameJoin -
string
optional
: define the extracted style output file name join part, by defaultvue-part
, e.g., the vue file isa.vue
, the extracted style output file name isa-vue-part.css
-
template -
Object
optional
: define the template compile option, the detail option information referfisx-vue-loader
orfisx-vue1-loader
. -
script -
Object
optional
: define the script compile option, the detail option information referfisx-vue-loader
orfisx-vue1-loader
. -
style -
Object
optional
: define the style compile option, the detail option information referfisx-vue-loader
orfisx-vue1-loader
. -
sourceMap -
boolean
optional
: whether output the source map information file, by defaultfalse
-
isProduction -
boolean
optional
: whether release in production environment, by defaulttrue