Skip to content

Related Projects

Haoqun Jiang edited this page Mar 3, 2020 · 6 revisions

ESLint Configs

Other Popular Plugins

View https://awesomejs.dev/for/vue-cli/ for a curated list of popular plugins.

You can also search for vue-cli-plugin on npm to see a complete list of available plugins.

Underlying Vue-Related Packages

Client Side

Compilation

  • vue-loader A loader for webpack that allows you to author Vue components in a format called Single-File Components (SFCs).
  • vue-style-loader Fork of style-loader, used by vue-loader, handles the <style> blocks in .vue files.
  • @vue/component-compiler-utils Lower level utilities for compiling Vue single file components (Vue 2 only), used by vue-loader and rollup-plugin-vue.
  • vue-template-compilerThis package can be used to pre-compile Vue 2.0 templates into render functions to avoid runtime-compilation overhead and CSP restrictions. It’s the default template compiler used by the @vue/component-compiler-utils. But it is also possible to replace it with any custom template compilers such as nativescript-vue-template-compiler. This package should be listed in the user project so that the user can customize the template compiler when necessary.
  • vue-template-es2015-compiler It processes the raw render functions generated by vue-template-compiler to support ES2015 features, and removes the with block inside render functions to make it strict-mode compliant. Used by vue-loader.
  • @vue/compiler-sfc Lower level utilities for compiling Vue single file components (Vue 3 only), the successor of @vue/component-compiler-utils, used by vue-loader.
  • @vue/babel-preset-jsx The babel preset that compiles JSX syntax to Vue 2 render functions.

Linting

  • eslint-plugin-vue The official ESLint plugin for Vue.js. It enables .vue file parsing in ESLint; provides several Vue.js-specific rules and rulesets.

Testing

Alternative Ways to Bundle Vue Components

  • Rollup Because of its powerful tree-shaking ability, Rollup is quite popular among library authors. You can use vue-sfc-rollup to scaffold a project for component libraries. If you want to write your own configurations instead, the official plugin is rollup-plugin-vue.
  • Parcel Parcel is a fast, zero-configuration web application bundler. It supports Vue.js out of the box.
  • vue-compile Sometimes you may want to publish .vue files instead of the compiled render functions to npm, but don’t want the code to contain syntaxes that require specific preprocessors such as sass or less. vue-compile can help to compile away these syntaxes while still reserve the .vue format.