CLI Version
8.5.0
Node.js Version
22.21.1
Operating System
macOS 26.4.1
Description
Write module and theme fields using JavaScript (https://developers.hubspot.com/docs/cms/start-building/building-blocks/fields/write-fields-using-javascript)
hs cms theme preview does not respect JavaScript-based fields (fields.js)
Primary problem:
The hs cms theme preview CLI command does not appear to process or convert JavaScript-based field definitions (fields.js / .cjs / .mjs). As a result, the local preview does not render fields correctly for themes/modules that use JS-authored fields.
Actual behavior:
The local preview does not render the fields defined in fields.js. It seems the command only reads fields.json and ignores JS field files.
Steps to Reproduce
- Create a theme/module that defines fields usingfields.js(nofields.json).
- Run hs cms theme preview .
- Open the local preview URL
Expected Behavior
hs cms theme preview should evaluate fields.js (similar to how hs upload / hs watch do with --convertFields) and render the local preview using the resolved field values.
Screenshots
No response
Debug Output
No response
Additional Context
No response
CLI Version
8.5.0
Node.js Version
22.21.1
Operating System
macOS 26.4.1
Description
Write module and theme fields using JavaScript (https://developers.hubspot.com/docs/cms/start-building/building-blocks/fields/write-fields-using-javascript)
hs cms theme preview does not respect JavaScript-based fields (fields.js)
Primary problem:
The hs cms theme preview CLI command does not appear to process or convert JavaScript-based field definitions (fields.js / .cjs / .mjs). As a result, the local preview does not render fields correctly for themes/modules that use JS-authored fields.
Actual behavior:
The local preview does not render the fields defined in fields.js. It seems the command only reads fields.json and ignores JS field files.
Steps to Reproduce
Expected Behavior
hs cms theme previewshould evaluate fields.js (similar to how hs upload / hs watch do with --convertFields) and render the local preview using the resolved field values.Screenshots
No response
Debug Output
No response
Additional Context
No response