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

0.0.0 • Public • Published

@vitejs/plugin-cdn npm

Note: this plugin requires vite@^2.0.0-beta.26.

A plugin that loads specified dependencies over Native-ESM CDNs during dev, and downloads / includes them in the production bundle during build.

Usage

// vite.config.js
import cdn from "@vitejs/plugin-cdn";

export default {
  plugins: [
    // provider can be one of: 'skypack' | 'esm.run' | 'jspm'
    cdn("skypack", {
      // list dependencies like in package.json
      // note that jspm does not support semver ranges
      vue: "^3.0.5",
    }),
  ],
};

Supported Native ESM CDNs


*Note: jspm does not support semver ranges and can only use exact version of dist tags. It also detects the usage of process.env and turns Vue esm files into CJS which breaks its usage as native ESM.

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-cdn-tmp

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

6.01 kB

Total Files

4

Last publish

Collaborators

  • sachaw