This is the Weex template compiler for Vue 2.0, used internally by weex-vue-loader to compile .vue files into Weex-compatible JavaScript bundles. The package is auto-generated from the Vue 2 source and is no longer actively maintained. It supports only Vue 2 (EOL December 2023) and does not work with Vue 3. The compiler produces render functions optimized for Weex's native rendering engine. Compared to the standard Vue template compiler, this version adds Weex-specific directives and component handling. Current version is 2.5.16-weex.1, and there have been no updates since Vue 2 entered maintenance mode.
npm install weex-template-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to compile a simple Weex template string into a render function using the compile method.
Migrate to Vue 3 and use the standard Vue 3 template compiler if targeting Weex (or consider alternative frameworks).
Use 'vue-template-compiler' for web projects; only use 'weex-template-compiler' when building Weex apps.
If using an older weex-vue-loader, pin the compiler to version 2.4.x or upgrade both packages together.
Refer to the source code (src/platforms/weex/entry-compiler.js) for exact API, as documentation is incomplete.
Consider using React Native or Flutter for cross-platform native apps.
Run: npm install weex-template-compiler@2.5.16-weex.1 --save-dev
Use: const { compile } = require('weex-template-compiler');Only run this compiled code in a Weex container (e.g., Weex playground, Android/iOS Weex SDK).