juxscript 1.1.139 → 1.1.140
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/dom-structure-map.json +1 -1
- package/machinery/compiler3.js +14 -23
- package/package.json +1 -1
package/dom-structure-map.json
CHANGED
package/machinery/compiler3.js
CHANGED
|
@@ -547,10 +547,6 @@ document.addEventListener('click', (e) => {
|
|
|
547
547
|
target: 'esnext',
|
|
548
548
|
sourcemap: true,
|
|
549
549
|
|
|
550
|
-
// ✅ FIX: Remove external packages restriction - bundle EVERYTHING
|
|
551
|
-
// This allows axios, lodash, date-fns, etc. to be bundled
|
|
552
|
-
// Remove the packages: 'external' or external: [...] config
|
|
553
|
-
|
|
554
550
|
loader: {
|
|
555
551
|
'.jux': 'js',
|
|
556
552
|
'.css': 'empty'
|
|
@@ -566,27 +562,22 @@ document.addEventListener('click', (e) => {
|
|
|
566
562
|
}
|
|
567
563
|
}],
|
|
568
564
|
|
|
569
|
-
// ✅
|
|
570
|
-
|
|
571
|
-
|
|
565
|
+
// ✅ FIX: Only mark true Node.js built-ins as external
|
|
566
|
+
// Remove axios-related modules from external list
|
|
567
|
+
external: [],
|
|
572
568
|
|
|
573
|
-
// ✅
|
|
574
|
-
// These should NOT be bundled (they don't work in browser)
|
|
575
|
-
external: [
|
|
576
|
-
'fs',
|
|
577
|
-
'path',
|
|
578
|
-
'http',
|
|
579
|
-
'https',
|
|
580
|
-
'stream',
|
|
581
|
-
'zlib',
|
|
582
|
-
'crypto'
|
|
583
|
-
],
|
|
584
|
-
|
|
585
|
-
// ✅ NEW: Define globals for node built-ins
|
|
569
|
+
// ✅ Define process.env and global for browser
|
|
586
570
|
define: {
|
|
587
|
-
'process.env.NODE_ENV': '
|
|
588
|
-
'global': '
|
|
589
|
-
}
|
|
571
|
+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
|
|
572
|
+
'global': 'globalThis'
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
// ✅ Provide empty shims for Node.js built-ins
|
|
576
|
+
inject: [],
|
|
577
|
+
|
|
578
|
+
// ✅ Minify only in production
|
|
579
|
+
minify: process.env.NODE_ENV === 'production',
|
|
580
|
+
treeShaking: true,
|
|
590
581
|
});
|
|
591
582
|
|
|
592
583
|
console.log('✅ esbuild complete');
|