Skip to content

fisx-suite/fisx-parser-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fisx-parser-vue

Dependency Status devDependency Status NPM Version

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 vue1
fis.require('parser-vue').parser = require('fisx-vue1-loader');

// using vue2
// fis.require('parser-vue').parser = require('fisx-vue-loader');

fis.match('/src/(**.vue)', {
    rExt: 'vue.js',
    relative: true,
    parser: fis.plugin('vue', {
        script: {
            lang: 'babel'
        }
    }),
    preprocessor: [
        fis.plugin('babel'), // when 
        fis.plugin('amd')
    ]
});

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 default vue-part, e.g., the vue file is a.vue, the extracted style output file name is a-vue-part.css

  • template - Object optional: define the template compile option, the detail option information refer fisx-vue-loader or fisx-vue1-loader.

  • script - Object optional: define the script compile option, the detail option information refer fisx-vue-loader or fisx-vue1-loader.

  • style - Object optional: define the style compile option, the detail option information refer fisx-vue-loader or fisx-vue1-loader.

  • sourceMap - boolean optional: whether output the source map information file, by default false

  • isProduction - boolean optional: whether release in production environment, by default true

About

A parser for fisx to compile vue component

Resources

Stars

Watchers

Forks

Packages

No packages published