vite-plugin-cdn2
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

vite-plugin-cdn

Coverage Status

Install

$ 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"] }),
  ],
});

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.

JetBrains Black Box Logo logo.

Document

LICENSE

MIT

Author

Kanno

Package Sidebar

Install

npm i vite-plugin-cdn2

Weekly Downloads

287

Version

1.1.0

License

MIT

Unpacked Size

65.6 kB

Total Files

36

Last publish

Collaborators

  • nonzzz