Skip to main content

Vue 2 SFC

Vue.js, The Progressive JavaScript Framework, is an approachable, performant and versatile framework for building web user interfaces.

This is the documentation for LiveCodes language support for the older Vue 2 Single-File Component (SFC). For the latest Vue SFC head to Vue 3 SFC documentations.

caution

Please note that, officially, Vue 2 End of Life (EOL) is set to December 31st, 2023.

Important Note

Vue 2 SFC language support in LiveCodes is different from that for Vue 3.

Unlike Vue 3, which uses the official SFC compiler (@vue/compiler-sfc) to compile SFC to regular JavaScript which is then sent to the result page, Vue 2 SFC support uses vue3-sfc-loader, which is loaded in the result page and the SFC is compiled on the fly in the end user's browser. This has a significant performance impact.

vue3-sfc-loader is currently at version 0.8.4, which is compatible with Vue 2 version 2.6.14.
Vue 2.7 is not supported.

Usage

Vue 2 SFC support includes Scoped CSS, pre-processors, JSX and src imports.

Language Info

Name

vue2

Extensions

.vue2

Editor

script

Compiler

vue3-sfc-loader.

Version

vue3-sfc-loader: v0.9.5, which is compatible with Vue v2.6.14

Code Formatting

Using Prettier.