@webmate-studio/builder 0.2.28 → 0.2.29

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.
Files changed (2) hide show
  1. package/build-service.js +15 -3
  2. package/package.json +1 -1
package/build-service.js CHANGED
@@ -219,11 +219,23 @@ async function buildComponent(payload) {
219
219
  console.log(`[Build Service] ✓ Transformed HTML: ${islandNames.length} island(s) → Custom Elements`);
220
220
  }
221
221
 
222
- // Generate CSS
222
+ // Generate CSS from HTML + Islands
223
223
  let css = '';
224
- if (transformedHtml) {
224
+ if (transformedHtml || bundledIslands.length > 0) {
225
225
  console.log('[Build Service] Generating CSS...');
226
- const cssResult = await generateComponentCSS(transformedHtml, {
226
+
227
+ // Combine HTML and island content for CSS scanning
228
+ let contentToScan = transformedHtml || '';
229
+
230
+ // Add island content (they contain Tailwind classes too!)
231
+ if (bundledIslands.length > 0) {
232
+ for (const island of bundledIslands) {
233
+ contentToScan += '\n' + island.content;
234
+ }
235
+ console.log(`[Build Service] Including ${bundledIslands.length} island(s) for CSS scanning`);
236
+ }
237
+
238
+ const cssResult = await generateComponentCSS(contentToScan, {
227
239
  designTokens: null,
228
240
  minify: true
229
241
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmate-studio/builder",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [