Skip to content

nonzzz/vite-plugin-cdn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 26, 2023
89c9654 · Dec 26, 2023
Dec 14, 2023
Dec 25, 2023
Nov 7, 2023
Dec 25, 2023
Dec 26, 2023
Dec 14, 2023
Dec 25, 2023
Dec 26, 2023
Nov 7, 2023
Dec 14, 2023
Sep 22, 2023
Dec 26, 2023
Sep 21, 2022
Dec 25, 2023
Oct 20, 2023
Dec 26, 2023
Jul 30, 2023
Dec 25, 2023
Dec 14, 2023

Repository files navigation

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