@bndynet/vue-site 0.1.7 → 0.1.8
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/bin/vue-site.mjs +7 -15
- package/package.json +1 -1
package/bin/vue-site.mjs
CHANGED
|
@@ -389,21 +389,13 @@ async function buildViteConfig(options = {}) {
|
|
|
389
389
|
},
|
|
390
390
|
},
|
|
391
391
|
optimizeDeps: {
|
|
392
|
-
//
|
|
393
|
-
//
|
|
394
|
-
//
|
|
395
|
-
// "does not provide an export named 'default'"
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
'dayjs/plugin/advancedFormat',
|
|
400
|
-
'dayjs/plugin/customParseFormat',
|
|
401
|
-
'dayjs/plugin/weekOfYear',
|
|
402
|
-
'dayjs/plugin/weekYear',
|
|
403
|
-
'dayjs/plugin/dayOfYear',
|
|
404
|
-
'dayjs/plugin/isSameOrAfter',
|
|
405
|
-
'dayjs/plugin/isSameOrBefore',
|
|
406
|
-
],
|
|
392
|
+
// Pre-bundle element-plus so Vite crawls its dependency graph and
|
|
393
|
+
// discovers dayjs (a CJS/UMD package with no ESM default export).
|
|
394
|
+
// Without this, dayjs.min.js is served raw to the browser and
|
|
395
|
+
// Element Plus throws "does not provide an export named 'default'".
|
|
396
|
+
// The virtual entry only imports element-plus CSS, so Vite's static
|
|
397
|
+
// analysis never sees the JS side — this include bridges that gap.
|
|
398
|
+
include: ['element-plus'],
|
|
407
399
|
},
|
|
408
400
|
server: {
|
|
409
401
|
open: true,
|