vbuild is a Python library (v0.8.2) designed to extract HTML, JavaScript, and CSS from Vue.js `.vue` single-file components. Its primary advantage is operating without a Node.js environment, making it suitable for Python-only backends. It supports minification and targets ES2015-compliant JavaScript. The project is currently in active maintenance with infrequent updates.
pip install vbuildVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate VBuild with a Vue SFC string and extract its `html`, `script`, and `style` components. It also shows basic minification options.
For critical applications requiring highly robust Vue SFC parsing, consider `vuejs-sfc-parser` or Node.js-based tools. Ensure your Vue SFCs strictly adhere to standard syntax when using `vbuild`.
Be aware that the extracted `script` content is raw. If you need full JavaScript transpilation or Vue component compilation, you will need to integrate additional tools (e.g., Babel, TypeScript, or a simple `esbuild` subprocess call) into your workflow.