Vtex CMS Template Transpiler
raw JSON → 1.10.0 verified Fri May 01 auth: no javascript
Template transpiler and local development proxy for Vtex CMS. Version 1.10.0 supports native HTTP proxy, parsing of templates, subtemplates, custom controls, native controls, placeholders, shelves, and shelf controls. It auto-injects base scripts per page type and allows dynamic store replace rules. Requires Node >=15. Still incomplete with missing automated backup and upload features. Support via WhatsApp only. Last release 1.0.2.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/vtex-cms-template-transpiler/index.js from /path/to/your-file.js not supported. ↓
cause Package is ESM-only and cannot be required with CommonJS require().
fix
Use import statements and ensure your project is ESM (type: 'module' in package.json or .mjs extension).
error SyntaxError: Unexpected token 'export' ↓
cause Node.js version <15 does not support ESM. The package uses ES modules.
fix
Upgrade Node.js to version >=15 or use a transpiler like Babel.
error TypeError: Cannot read properties of undefined (reading 'port') ↓
cause Missing or invalid configuration object passed to startProxy().
fix
Ensure config object has valid port, storeUrl, and workspace properties.
Warnings
breaking Node.js version >= 15 required - ESM only, no CommonJS support ↓
fix Update Node.js to v15 or higher and use ESM imports (import ... from).
gotcha Support is only through WhatsApp - no issue tracker or public forum ↓
fix Contact via https://api.whatsapp.com/send?phone=5511948559073 for help.
deprecated axios security update in v1.0.2 - earlier versions may have vulnerabilities ↓
fix Upgrade to v1.0.2 or later.
gotcha Package is incomplete - many features not yet implemented (backup, upload, etc.) ↓
fix Check the README for list of unimplemented features before using in production.
gotcha Documentation is in Portuguese only and marked as 'coming soon' ↓
fix Contact via WhatsApp for setup details.
Install
npm install vtex-cms-template-transpiler yarn add vtex-cms-template-transpiler pnpm add vtex-cms-template-transpiler Imports
- VtexCMS wrong
const vtex = require('vtex-cms-template-transpiler')correctimport { VtexCMS } from 'vtex-cms-template-transpiler' - startProxy wrong
const { startProxy } = require('vtex-cms-template-transpiler')correctimport { startProxy } from 'vtex-cms-template-transpiler' - parseTemplate wrong
import parseTemplate from 'vtex-cms-template-transpiler'correctimport { parseTemplate } from 'vtex-cms-template-transpiler'
Quickstart
import { startProxy } from 'vtex-cms-template-transpiler';
const config = {
port: 3000,
storeUrl: 'https://myvtexstore.com',
workspace: 'test'
};
startProxy(config).then(() => {
console.log('Proxy running on port 3000');
}).catch(err => {
console.error('Failed to start proxy:', err);
});