fix(web): resolve preloader freeze, dayjs ESM resolution, and missing icons
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ArrowLeft, ArrowRight } from "lucide-vue-next";
|
||||
import DynamicIcon from "~/components/ui/DynamicIcon.vue";
|
||||
import Reveal from "~/components/ui/Reveal.vue";
|
||||
import SectionHead from "~/components/ui/SectionHead.vue";
|
||||
|
||||
+28
-2
@@ -11,6 +11,17 @@ export default defineNuxtConfig({
|
||||
modules: ["@pinia/nuxt"],
|
||||
css: ["~/assets/css/main.css", "~/assets/css/antd-overrides.css"],
|
||||
|
||||
alias: {
|
||||
"dayjs/plugin/advancedFormat": "dayjs/esm/plugin/advancedFormat/index.js",
|
||||
"dayjs/plugin/customParseFormat": "dayjs/esm/plugin/customParseFormat/index.js",
|
||||
"dayjs/plugin/localeData": "dayjs/esm/plugin/localeData/index.js",
|
||||
"dayjs/plugin/quarterOfYear": "dayjs/esm/plugin/quarterOfYear/index.js",
|
||||
"dayjs/plugin/weekOfYear": "dayjs/esm/plugin/weekOfYear/index.js",
|
||||
"dayjs/plugin/weekYear": "dayjs/esm/plugin/weekYear/index.js",
|
||||
"dayjs/plugin/weekday": "dayjs/esm/plugin/weekday/index.js",
|
||||
dayjs: "dayjs/esm/index.js",
|
||||
},
|
||||
|
||||
app: {
|
||||
head: {
|
||||
htmlAttrs: { lang: siteConfig.lang, dir: siteConfig.dir },
|
||||
@@ -73,12 +84,27 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
build: {
|
||||
transpile: ["ant-design-vue", "@ant-design/icons-vue", "@ctrl/tinycolor"],
|
||||
transpile: ["ant-design-vue", "@ant-design/icons-vue", "@ctrl/tinycolor", "dayjs"],
|
||||
},
|
||||
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
ssr: { noExternal: ["ant-design-vue", "@ant-design/icons-vue", "@ctrl/tinycolor"] },
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
"ant-design-vue",
|
||||
"@ant-design/icons-vue",
|
||||
"@ctrl/tinycolor",
|
||||
"dayjs",
|
||||
"dayjs/plugin/advancedFormat",
|
||||
"dayjs/plugin/customParseFormat",
|
||||
"dayjs/plugin/localeData",
|
||||
"dayjs/plugin/quarterOfYear",
|
||||
"dayjs/plugin/weekOfYear",
|
||||
"dayjs/plugin/weekYear",
|
||||
"dayjs/plugin/weekday",
|
||||
],
|
||||
},
|
||||
ssr: { noExternal: ["ant-design-vue", "@ant-design/icons-vue", "@ctrl/tinycolor", "dayjs"] },
|
||||
},
|
||||
|
||||
typescript: { strict: true },
|
||||
|
||||
Reference in New Issue
Block a user