@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.
Files changed (2) hide show
  1. package/bin/vue-site.mjs +7 -15
  2. 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
- // dayjs ships a UMD browser build (dayjs.min.js) which has no ESM default
393
- // export. Listing it here forces Vite to pre-bundle it into a proper ESM
394
- // module before the browser requests it preventing the
395
- // "does not provide an export named 'default'" SyntaxError from Element Plus.
396
- include: [
397
- 'dayjs',
398
- 'dayjs/plugin/localeData',
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bndynet/vue-site",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "A configurable Vue 3 site framework with sidebar navigation, markdown rendering, and theme switching.",
6
6
  "repository": {