@webmate-studio/builder 0.2.77 → 0.2.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-service.js +3 -3
- package/package.json +1 -1
package/build-service.js
CHANGED
|
@@ -172,9 +172,9 @@ async function buildComponent(payload) {
|
|
|
172
172
|
// These become Custom Elements, others are just utilities/sub-components
|
|
173
173
|
const usedIslands = new Set();
|
|
174
174
|
if (html) {
|
|
175
|
-
// Find all custom elements in HTML (e.g. <MenuMobile />, <SearchModal />)
|
|
176
|
-
// Match: <ComponentName or <ComponentName
|
|
177
|
-
const componentTagRegex = /<([A-Z][a-zA-Z0-9]*)
|
|
175
|
+
// Find all custom elements in HTML (e.g. <MenuMobile />, <SearchModal data={...} />)
|
|
176
|
+
// Match: <ComponentName ...> or <ComponentName .../> (with or without attributes)
|
|
177
|
+
const componentTagRegex = /<([A-Z][a-zA-Z0-9]*)[^>]*?\/?>/g;
|
|
178
178
|
let match;
|
|
179
179
|
while ((match = componentTagRegex.exec(html)) !== null) {
|
|
180
180
|
const componentName = match[1]; // e.g. "MenuMobile"
|