ui_migration chore(vite) Add comment on AST parsing

This commit is contained in:
Antonio Anaya 2026-05-20 22:27:39 -06:00
parent 6b864f57df
commit f2a60154dd

View file

@ -40,6 +40,9 @@ export default defineConfig(({ command, mode }) => {
? [ ? [
(node) => { (node) => {
// Check if the current AST node is an HTML element // Check if the current AST node is an HTML element
// Node.type 1 is equal to node.type ELEMENT
// https://developer.mozilla.org/es/docs/Web/API/Node/nodeType
// https://developer.mozilla.org/es/docs/Web/API/Element
if (node.type === 1) { if (node.type === 1) {
// Filter out any property named "data-test-id" // Filter out any property named "data-test-id"
node.props = node.props.filter((prop) => prop.name !== "data-test-id"); node.props = node.props.filter((prop) => prop.name !== "data-test-id");