{"id":17617426,"url":"https://github.com/juniortour/vue-template-babel-compiler","last_synced_at":"2025-04-05T22:10:05.366Z","repository":{"id":41970135,"uuid":"378691393","full_name":"JuniorTour/vue-template-babel-compiler","owner":"JuniorTour","description":"Enable Optional Chaining(?.), Nullish Coalescing(??) and many new ES syntax for Vue.js SFC based on Babel","archived":false,"fork":false,"pushed_at":"2023-03-25T06:45:58.000Z","size":1146,"stargazers_count":120,"open_issues_count":18,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-05T22:10:00.850Z","etag":null,"topics":["babel","sfc","vue","vue-template","vue-template-babel","vue2"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/vue-template-babel-compiler","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuniorTour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-20T16:28:38.000Z","updated_at":"2024-11-27T07:56:55.000Z","dependencies_parsed_at":"2024-06-18T13:50:36.766Z","dependency_job_id":null,"html_url":"https://github.com/JuniorTour/vue-template-babel-compiler","commit_stats":{"total_commits":122,"total_committers":7,"mean_commits":"17.428571428571427","dds":0.08196721311475408,"last_synced_commit":"cc99fe21cf2e60a095fabca8ea57832bac1d2ee9"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuniorTour%2Fvue-template-babel-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuniorTour%2Fvue-template-babel-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuniorTour%2Fvue-template-babel-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuniorTour%2Fvue-template-babel-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuniorTour","download_url":"https://codeload.github.com/JuniorTour/vue-template-babel-compiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406111,"owners_count":20933806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","sfc","vue","vue-template","vue-template-babel","vue2"],"created_at":"2024-10-22T19:13:39.792Z","updated_at":"2025-04-05T22:10:05.318Z","avatar_url":"https://github.com/JuniorTour.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-template-babel-compiler \u0026middot; [![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)\n\nEnable `Optional Chaining(?.)`, `Nullish Coalescing(??)` and many new ES syntax for [Vue.js SFC](https://vuejs.org/v2/guide/single-file-components.html) based on [Babel](https://babeljs.io/).\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-template-babel-compiler\" target=\"_blank\"\u003e\n    \u003cimg\n    src=\"https://img.shields.io/npm/dt/vue-template-babel-compiler\"\n    alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-template-babel-compiler\" target=\"_blank\"\u003e\n    \u003cimg\n    src=\"https://img.shields.io/github/size/JuniorTour/vue-template-babel-compiler/lib/index.js\"\n    alt=\"Size\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-template-babel-compiler\" target=\"_blank\"\u003e\n    \u003cimg\n    src=\"https://img.shields.io/npm/v/vue-template-babel-compiler.svg?sanitize=true\"\n    alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/JuniorTour/vue-template-babel-compiler\" target=\"_blank\"\u003e\n    \u003cimg\n    src=\"https://img.shields.io/github/last-commit/JuniorTour/vue-template-babel-compiler?sanitize=true\"\n    alt=\"LastCommit\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/JuniorTour/vue-template-babel-compiler/actions/workflows/main.yml\" target=\"_blank\"\u003e\n    \u003cimg\n    src=\"https://github.com/JuniorTour/vue-template-babel-compiler/actions/workflows/main.yml/badge.svg\"\n    alt=\"CIStatus\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## DEMO\n\u003ca href=\"https://stackblitz.com/edit/github-vue-template-babel-compiler-cnvbcs?file=components%2FTutorial.vue\u0026terminal=dev\" target=\"_blank\"\u003e\nVisit Online Playground →\n\u003c/a\u003e\n\n![DEMO](https://user-images.githubusercontent.com/14243906/127761300-076db45a-cdce-4fda-bd02-1f4fa96de6d8.png)\n\n## Features\n- All features of [vue-template-compiler](https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#readme) \u0026\u0026 [vue-template-es2015-compiler](https://github.com/vuejs/vue-template-es2015-compiler)\n- New ES syntax: `Optional Chaining`, `Bigint`, `Nullish Coalescing` and more\n- Use babel to transpile vue render function, customization syntax, babel options customization\n\n## Usage\n### 1. Install\n``` bash\nnpm install vue-template-babel-compiler --save-dev\n```\n\n### 2. Config\n#### 1. [Vue-CLI](https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader)\n\n\u003ca href=\"https://stackblitz.com/edit/vue-template-babel-compiler-vue-cli-project?file=src%2FApp.vue\u0026terminal=serve\" target=\"_blank\"\u003e\nVue-CLI Online Example Project\n\u003c/a\u003e\n\n``` js\n// vue.config.js\nmodule.exports = {\n  chainWebpack: config =\u003e {\n    config.module\n      .rule('vue')\n      .use('vue-loader')\n      .tap(options =\u003e {\n        options.compiler = require('vue-template-babel-compiler')\n        return options\n      })\n  }\n}\n```\n\n#### 2. [Nuxt.js](https://nuxtjs.org/docs/2.x/features/configuration#extend-webpack-to-load-audio-files)\n\n\u003ca href=\"https://stackblitz.com/edit/github-vue-template-babel-compiler-cnvbcs?file=components%2FTutorial.vue\u0026terminal=dev\" target=\"_blank\"\u003e\nNuxt.js Online Example Project\n\u003c/a\u003e\n\n``` js\n// nuxt.config.js\nexport default {\n  // Build Configuration: https://go.nuxtjs.dev/config-build\n  build: {\n    loaders: {\n      vue: {\n        compiler: require('vue-template-babel-compiler')\n      }\n    },\n  },\n  // ...\n}\n```\n\n## [Doc](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md)\n- [vue-jest Usage](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#1-vue-jest)\n- [Webpack Usage](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#2-webpack)\n- [Vite Usage](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#4-vite-usage)\n- [VueUse \u0026\u0026 `\u003cscript setup\u003e` Usage](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#3-vueuse--script-setup)\n- [babel options customization](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#1-babel-options-customization)\n- [Functional Component Usage](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/Usage.md#1-functional-component-usage)\n\n## [API Doc](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/doc/API.md)\n\n\n### Welcome for Issues \u0026\u0026 PR, see [CONTRIBUTING.md](https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/CONTRIBUTING.md) for detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniortour%2Fvue-template-babel-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniortour%2Fvue-template-babel-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniortour%2Fvue-template-babel-compiler/lists"}