@bndynet/vue-site 0.1.6 → 0.1.7

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 +17 -0
  2. package/package.json +1 -1
package/bin/vue-site.mjs CHANGED
@@ -388,6 +388,23 @@ async function buildViteConfig(options = {}) {
388
388
  'vue-router': resolve(vueRouterPath, 'dist/vue-router.mjs'),
389
389
  },
390
390
  },
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
+ ],
407
+ },
391
408
  server: {
392
409
  open: true,
393
410
  ...(port != null && { port }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bndynet/vue-site",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "A configurable Vue 3 site framework with sidebar navigation, markdown rendering, and theme switching.",
6
6
  "repository": {