@webmate-studio/builder 0.2.27 → 0.2.28
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 +5 -2
- package/package.json +1 -1
package/build-service.js
CHANGED
|
@@ -197,14 +197,17 @@ async function buildComponent(payload) {
|
|
|
197
197
|
// Read bundled content
|
|
198
198
|
const bundledContent = readFileSync(outputPath, 'utf8');
|
|
199
199
|
|
|
200
|
+
// Use output filename (.js) not input filename (.svelte)
|
|
201
|
+
const outputFilename = island.file.replace(/\.(jsx?|tsx?|svelte|vue)$/, '.js');
|
|
202
|
+
|
|
200
203
|
bundledIslands.push({
|
|
201
|
-
file:
|
|
204
|
+
file: outputFilename, // Use .js extension!
|
|
202
205
|
content: bundledContent,
|
|
203
206
|
size: result.size,
|
|
204
207
|
originalSize: island.content.length
|
|
205
208
|
});
|
|
206
209
|
|
|
207
|
-
console.log(`[Build Service] ✓ ${island.file} → ${(result.size / 1024).toFixed(2)}kb`);
|
|
210
|
+
console.log(`[Build Service] ✓ ${island.file} → ${outputFilename} (${(result.size / 1024).toFixed(2)}kb)`);
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
213
|
|