vue-template-babel-compiler
Post compiler for Vue template render functions to support ES features with Babel
Last updated 4 years ago by juniortour .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vue-template-babel-compiler 
SYNC missed versions from official npm registry.

vue-template-babel-compiler · Maintenance PRs Welcome

Enable Optional Chaining(?.), Nullish Coalescing(??) and many new ES syntax for Vue.js SFC based on Babel.

Downloads Size Version LastCommit CIStatus

DEMO

Visit Online Playground →

DEMO

Features

Usage

1. Install

npm install vue-template-babel-compiler --save-dev

2. Config

1. Vue-CLI

Vue-CLI Online Example Project
// vue.config.js
module.exports = {
  chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .tap(options => {
        options.compiler = require('vue-template-babel-compiler')
        return options
      })
  }
}

2. Nuxt.js

Nuxt.js Online Example Project
// nuxt.config.js
export default {
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    loaders: {
      vue: {
        compiler: require('vue-template-babel-compiler')
      }
    },
  },
  // ...
}

Doc

API Doc

Welcome for Issues && PR, see CONTRIBUTING.md for detail.

Current Tags

  • 1.0.9-beta-0                                ...           beta (4 years ago)
  • 2.0.0                                ...           latest (4 years ago)
  • 1.0.0-1                                ...           next (5 years ago)

31 Versions

  • 2.0.0                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.3                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.9-beta-0                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.7-beta.0                                ...           4 years ago
  • 1.0.6-0                                ...           4 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 1.0.0-1                                ...           5 years ago
  • 1.0.0-0                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.7.0-0                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.6.0-0                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.5.0-0                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.4.0-0                                ...           5 years ago
  • 0.3.0-0                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago

Copyright 2013 - present © cnpmjs.org | Home |