Socket
Socket
Sign inDemoInstall

vue-template-babel-compiler

Package Overview
Dependencies
71
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-template-babel-compiler

Post compiler for Vue template render functions to support ES features with Babel


Version published
Maintainers
1
Install size
11.2 MB
Created

Readme

Source

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

  • All features of vue-template-compiler && vue-template-es2015-compiler
  • New ES syntax: Optional Chaining, Bigint, Nullish Coalescing and more
  • Use babel to transpile vue render function, customization syntax, babel options customization

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.

Keywords

FAQs

Last updated on 30 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc