vue-template-babel-compiler
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -113,6 +113,6 @@ 'use strict'; | ||
}, | ||
plugins: ['@babel/plugin-transform-computed-properties', '@babel/plugin-proposal-nullish-coalescing-operator', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-transform-block-scoping', '@babel/plugin-transform-destructuring', "@babel/plugin-transform-spread", ["@babel/plugin-proposal-object-rest-spread", { | ||
plugins: [require.resolve('@babel/plugin-transform-computed-properties'), require.resolve('@babel/plugin-proposal-nullish-coalescing-operator'), require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('@babel/plugin-transform-block-scoping'), require.resolve('@babel/plugin-transform-destructuring'), require.resolve("@babel/plugin-transform-spread"), [require.resolve("@babel/plugin-proposal-object-rest-spread"), { | ||
loose: true, | ||
useBuiltIns: true | ||
}], '@babel/plugin-transform-arrow-functions', '@babel/plugin-transform-parameters', parseWithStatementToVm] | ||
}], require.resolve('@babel/plugin-transform-arrow-functions'), require.resolve('@babel/plugin-transform-parameters'), parseWithStatementToVm] | ||
}, (options === null || options === void 0 ? void 0 : options.babelOptions) || {})); | ||
@@ -119,0 +119,0 @@ return output.code.replace(matchWithRegex, isFunctional ? functionalWithReplacement : withReplacement); |
{ | ||
"name": "vue-template-babel-compiler", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "Post compiler for Vue template render functions to support ES features with Babel", | ||
@@ -34,2 +34,5 @@ "main": "lib/index.js", | ||
}, | ||
"peerDependencies": { | ||
"vue-template-compiler": "^2.6.0" | ||
}, | ||
"dependencies": { | ||
@@ -36,0 +39,0 @@ "@babel/core": "^7.14.3", |
@@ -6,3 +6,3 @@ # vue-template-babel-compiler · [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/JuniorTour/vue-template-babel-compiler) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/CONTRIBUTING.md) | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler"> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler" target="_blank"> | ||
<img | ||
@@ -12,3 +12,3 @@ src="https://img.shields.io/npm/dt/vue-template-babel-compiler" | ||
</a> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler"> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler" target="_blank"> | ||
<img | ||
@@ -18,3 +18,3 @@ src="https://img.shields.io/github/size/JuniorTour/vue-template-babel-compiler/lib/index.js" | ||
</a> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler"> | ||
<a href="https://www.npmjs.com/package/vue-template-babel-compiler" target="_blank"> | ||
<img | ||
@@ -24,3 +24,3 @@ src="https://img.shields.io/npm/v/vue-template-babel-compiler.svg?sanitize=true" | ||
</a> | ||
<a href="https://github.com/JuniorTour/vue-template-babel-compiler"> | ||
<a href="https://github.com/JuniorTour/vue-template-babel-compiler" target="_blank"> | ||
<img | ||
@@ -30,3 +30,3 @@ src="https://img.shields.io/github/last-commit/JuniorTour/vue-template-babel-compiler?sanitize=true" | ||
</a> | ||
<a href="https://github.com/JuniorTour/vue-template-babel-compiler/actions/workflows/main.yml"> | ||
<a href="https://github.com/JuniorTour/vue-template-babel-compiler/actions/workflows/main.yml" target="_blank"> | ||
<img | ||
@@ -39,2 +39,6 @@ src="https://github.com/JuniorTour/vue-template-babel-compiler/actions/workflows/main.yml/badge.svg" | ||
## DEMO | ||
<a href="https://stackblitz.com/edit/github-vue-template-babel-compiler-cnvbcs?file=components%2FTutorial.vue&terminal=dev" target="_blank"> | ||
Visit Online Playground → | ||
</a> | ||
![DEMO](https://user-images.githubusercontent.com/14243906/127761300-076db45a-cdce-4fda-bd02-1f4fa96de6d8.png) | ||
@@ -44,4 +48,4 @@ | ||
- All features of [vue-template-compiler](https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#readme) && [vue-template-es2015-compiler](https://github.com/vuejs/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 | ||
- New ES syntax: `Optional Chaining`, `Bigint`, `Nullish Coalescing` and more | ||
- Use babel to transpile vue render function, customization syntax, babel options customization | ||
@@ -56,3 +60,7 @@ ## Usage | ||
#### 1. [Vue-CLI](https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader) | ||
[Example project for Vue-CLI](https://github.com/JuniorTour/vue-template-babel-compiler-vue-cli-project) | ||
<a href="https://stackblitz.com/edit/vue-template-babel-compiler-vue-cli-project?file=src%2FApp.vue&terminal=serve" target="_blank"> | ||
Vue-CLI Online Example Project | ||
</a> | ||
``` js | ||
@@ -74,3 +82,7 @@ // vue.config.js | ||
#### 2. [Nuxt.js](https://nuxtjs.org/docs/2.x/features/configuration#extend-webpack-to-load-audio-files) | ||
[Example project for Nuxt.js](https://github.com/JuniorTour/vue-template-babel-compiler-nuxt-project) | ||
<a href="https://stackblitz.com/edit/github-vue-template-babel-compiler-cnvbcs?file=components%2FTutorial.vue&terminal=dev" target="_blank"> | ||
Nuxt.js Online Example Project | ||
</a> | ||
``` js | ||
@@ -98,5 +110,5 @@ // nuxt.config.js | ||
## [API](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/API.md) | ||
## [API Doc](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/API.md) | ||
### Welcome for Issues && PR, see [CONTRIBUTING.md](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/CONTRIBUTING.md) for detail. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14194
105
13