// vite.config.jsimportcdnfrom'vite-plugin-cdn-import'exportdefault{plugins:[cdn({modules:[{name:'react',var:'React',path:`umd/react.production.min.js`,},{name:'react-dom',var:'ReactDOM',path:`umd/react-dom.production.min.js`,},],}),],} Use preset // vite.config.jsimportcdnfro...
npm i vite-plugin-cdn-import-rely --save-dev Usage Example importimportFromCDNfrom"vite-plugin-cdn-import-rely";exportdefaultdefineConfig({plugins:[importFromCDN([{name:"element-plus",var:"ElementPlus",path:"index.full.min.js",relys:["vue"],},{name:"element-plus/es/locale/lang/zh-cn"...
一个支持运行时 CDN 配置的 Vite 插件。 Install Make sure your vite version is2.9.0or higher. #pnpmpnpm add -D vite-plugin-runtime-cdn#yarnyarn add -D vite-plugin-runtime-cdn#npmnpm i -D vite-plugin-runtime-cdn Usage // vite.config.jsimport{defineConfig}from'vite'// 1. import the...
A vite plugin make import rely from CDN easier Version3.1.0LicenseMIT INSTALL Type:ESMDefault Version: import vitePluginCdnImportRely from'https://cdn.jsdelivr.net/npm/vite-plugin-cdn-import-rely@3.1.0/+esm' Learn more Statistics Requests19 Bandwidth...
$ yarn add vite-plugin-cdn2 -D # or $ npm install vite-plugin-cdn2 -D Usage // vite.config.ts import { defineConfig } from "vite"; import { cdn } from "vite-plugin-cdn2"; export default defineConfig({ plugins: [ // ... your plugin cdn({ modules: ["vue"] }), ], })...
// vite.config.jsimportcdnfrom'vite-plugin-cdn-import'exportdefault{plugins:[cdn({modules:[{name:'react',var:'React',path:`umd/react.production.min.js`,},{name:'react-dom',var:'ReactDOM',path:`umd/react-dom.production.min.js`,},],}),],} ...
Vite 官方团队也对 PWA 做了支持,通过 vite-plugin-pwa 可以方便的实现一个离线应用的配置。 不过目前发现了一个问题就是,当vite.config.ts的base选项设置为 CDN 地址时,构建出来的 PWA manifest 资源路径会读取错误,原因是 manifest 不能走 CDN,要单独从网站内读取,虽然跟作者提了优化建议(详见 #25),不过还...
A free, fast, and reliable CDN for vite-plugin-solid-markdown. Compile Markdown to SolidJS component
A free, fast, and reliable CDN for vite-plugin-prismjs. <h1 align="center">Vite Plugin Prismjs</h1>
> Note: as of `vue` 3.2.13+ and `@vitejs/plugin-vue` 1.9.0+, `@vue/compiler-sfc` is no longer required as a peer dependency.Version 5.1.4 License MIT INSTALL Type: ESM Default Version: Static import vitejspluginVue from 'https://cdn.jsdelivr.net/npm/@vitejs/plugin-vue@5.1....