icon indicating copy to clipboard operation copied to clipboard

A fast, global content delivery network for ES Modules.


A fast, global content delivery network for NPM packages with ES Module format.

Import from URL

import React from ""

Specify version

import React from "[email protected]"

You may also use a semver or a dist-tag instead of a fixed version number, or omit the version/tag entirely to use the latest tag:

import React from ""   // 17.0.2
import React from "" // 18.0.0-rc.0-next-13036bfbc-20220121


import { renderToString } from ""

or import non-module(js) files:

import "" assert { type: "json" }

Specify dependencies

import React from "[email protected]"
import useSWR from "[email protected]"

By default, rewrites import specifier based on the package's dependency statement. To specify version of dependencies, you can use the ?deps=PACKAGE@VERSION query. You can separate multiple dependencies with commas: [email protected],[email protected].

Specify external dependencies

  "imports": {
    "preact": "[email protected]",
    "preact-render-to-string": "[email protected]?external=preact",

You can use the ?external=PACKAGE query to specify external dependencies. Or you can mark all dependencies as external by add * prefix before the package name:

  "imports": {
    "preact": "[email protected]",
    "preact-render-to-string": "*[email protected]",
    "swr": "*[email protected]",
    "react": "[email protected]/compat",

These dependencies will not be resolved with the code. You need to use import maps to specify the location for these dependencies.

Aliasing dependencies

import useSWR from ""

in combination with ?deps:

import useSWR from "[email protected]"

The origin idea was coming from @lucacasonato.

Bundle mode

import { Button } from ""

In bundle mode, all dependencies will be bundled into a single JS file.

Development mode

import React from ""

The ?dev query builds modules with process.env.NODE_ENV equals to development, that is useful to build modules like React to allow you to get more development warn/error details.

ESBuild options

By default, will check the User-Agent header to get the build target automatically. You can specify it with the ?target query. Available targets: es2015 - es2022, esnext, node, and deno.

import React from ""

Other supported options of esbuild:

  • Keep names

    import React from ""
  • Ignore annotations

    import React from ""
  • Sourcemap

    import React from ""

    This only supports the inline mode.

Package CSS

import Daygrid from ""
<link rel="stylesheet" href="">

This only works when the NPM module imports CSS files in JS directly.

Deno compatibility will resolve the node internal modules (fs, child_process, etc.) with to support Deno.

import postcss from ""
import autoprefixer from ""

const { css } = await postcss([ autoprefixer ]).process(`
  backdrop-filter: blur(5px);
  user-select: none;

By default will use a fixed version of You can use the ?deno-std=$VER query to specify a different version:

import postcss from ""

Use CLI Script

The CLI script is using to manage the imports with import maps, it will resolve the dependencies automatically and always pin the build version. To use the CLI mode, you need to run the init command in your project root directory:

deno run -A -r init

After initializing, you can use the deno task npm:[add/update/remove] commands to manage the npm modules in the import maps.

deno task npm:add react react-dom # add packages
deno task npm:add react@17 # add packages with specified version
deno task npm:add react:preact/compat # add packages with alias
deno task npm:update react react-dom # upgrade packages
deno task npm:update # update all packages
deno task npm:remove react react-dom # remove packages


By default, will respond with a custom X-TypeScript-Types HTTP header when the types (.d.ts) is defined. This is useful for deno type checks (link).

Figure #1

You can pass the ?no-dts query to disable the X-TypeScript-Types header if some types are incorrect:

import unescape from ""

Pin the build version

Since we update server frequently, sometime we may break packages that work fine previously by mistake, the server will rebuild all modules when the patch pushed. To avoid this, you can pin the build version by the ?pin=BUILD_VERSON query. This will give you an immutable cached module.

import React from "[email protected]?pin=v95"

Global CDN

The Global CDN of is provided by Cloudflare, one of the world's largest and fastest cloud network platforms.


To host by yourself, check the hosting documentation.