vite-plugin-cdn3
v1.7.0
Published
Fixed version of vite-plugin-cdn with [some module package.json find error]
Readme
Install
$ yarn add vite-plugin-cdn3 -D
# or
$ npm install vite-plugin-cdn3 -D
Usage
// vite.config.ts
import { defineConfig } from "vite";
import { cdn } from "vite-plugin-cdn3";
export default defineConfig({
plugins: [
// ... your plugin
cdn({ modules: ["vue"] }),
],
});Options
| params | type | default | description |
| ---------- | --------------------------- | ------------------------------------------- | ---------------------------------------------------- |
| include | FilterPattern | /\.(mjs\|js\|ts\|vue\|jsx\|tsx)(\?.*\|)$/ | Include all assets matching any of these conditions. |
| exlcude | FilterPattern ß | - | Exclude all assets matching any of these conditions. |
| modules | Array<IModule \| string> | [] | Should convert module. |
| logLevel | slient\|warn | warn | Adjust console output verbosity. |
| resolve | ResolveOptions | jsdelivr plugin | URL parser injected into the page. |
| apply | string | build | Same as vite apply. |
Acknowledgements
Thanks to JetBrains for allocating free open-source licences for IDEs such as WebStorm.
Document
LICENSE
Author
Kanno
