vite-plugin-cdn2

A Vite plugin that allowed you replace module with CDN
22,904 80
Install
npm install vite-plugin-cdn2
Latest Version:1.1.0
Vue:3
License:MIT
Last Updated:Dec 13, 2024
Links: GitHub  ·  npm
Maintainer: nonzzz

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

Related Packages

@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686
vite-plugin-checker

Vite plugin that runs TypeScript type checker on a separate process.

133,975,562 1,242
@vitejs/plugin-vue-jsx

Provides Vue 3 JSX & TSX support with HMR.

93,663,827 686
vite-plugin-ssr

Like Next.js/Nuxt but as do-one-thing-do-it-well Vite plugin.

550,634 18
vite-plugin-md

Markdown for Vite

496,869 640

Version History

Version Released Vue License
1.1.0 ^3.3.4 MIT
1.0.0 ^3.3.4 MIT
0.16.0 ^3.3.4 MIT
0.15.4 ^3.3.4 MIT
0.15.3 ^3.3.4 MIT