1. 安装Vite插件npm install vite-plugin-cdn-import2. 使用插件// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import cdn from "vite-plugin-cdn-import";
export default defineConfig({
plugins: [vue(), cdn({
modules: [
"vue",
"vue-router",
{
name: "dayjs",
var: "dayjs",
path: [
"dayjs.min.js",
"plugin/customParseFormat.js",
"plugin/weekday.js",
"plugin/localeData.js",
"plugin/weekOfYear.js",
"plugin/weekYear.js",
"pl
1月前