modules served last 30d.

Create modern(es2015+) web apps easily with NPM packages in browser/deno.

No build tools needed!

import confetti from ""

How to Use

Import from URL

import React from ""

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 ""      // 18.2.0 (latest)
import React from ""   // 17.0.2
import React from "" // 18.3.0-next-ee8509801-20230117


import { renderToString } from ""

or import non-module(js) files:

import "" assert { type: "json" }

Specify Dependencies

By default, rewrites import specifiers based on the dependencies field of package.json. To specify version of these dependencies, you can add the ?deps=PACKAGE@VERSION query. Separate multiple dependencies with comma: ?deps=react@17.0.2,react-dom@17.0.2.

import React from ""
import useSWR from ""

Specify External Dependencies

You can add the ?external=foo,bar query to specify external dependencies. Since these dependencies are not resolved, you need to use import maps to specify the URL for these dependencies. If you are using Deno, you can use the CLI Script to generate and update the import maps that will resolve the external dependencies automatically.

  "imports": {
    "preact": "",
    "preact-render-to-string": "",

Or you can mark all dependencies as external by adding * prefix before the package name:

  "imports": {
    "preact": "",
    "preact-render-to-string": "*preact-render-to-string@5.2.0",
    "swr": "*swr@1.3.0",
    "react": "",

Import maps supports trailing slash that can not work with URL search params friendly. To fix this issue, provides a special format for import URL that allows you to use query params with trailing slash: change the query prefix ? to & and put it after the package version.

  "imports": {
    "react-dom": "",
    "react-dom/": "",

Aliasing Dependencies

import useSWR from ""

in combination with ?deps:

import useSWR from ""

The origin idea was coming from @lucacasonato.

Tree Shaking

By default bundles module with all export members, you can specify the exports by adding ?exports=foo,bar query. With esbuild tree shaking, you can get a smaller bundle size:

import { __await, __rest } from "" // 7.3KB
import { __await, __rest } from ",__rest" // 489B

This only works with ESM modules, CJS modules are not supported.

Bundle mode

import { Button } from ""

In bundle mode, all dependencies are bundled into a single JS file except the peer dependencies.

Development mode

import React from ""

With the ?dev option, builds modules with process.env.NODE_ENV set to "development" or based on the condition development in the exports field of package.json. This is useful for libraries that have different behavior in development and production. For example, React will use a different warning message in development mode.

ESBuild options

By default, checks the User-Agent header to determine the build target. You can also specify the target by adding ?target, available targets are: es2015 - es2022, esnext, node, and deno.

import React from ""

Other supported options of esbuild:

  • Keep names
    import React from ""
  • Ignore annotations
    import React from ""

Web Worker supports ?worker query to load the module as a web worker:

import editorWorker from ""

const worker = editorWorker()

You can pass some custom code snippet to the worker when calling the factory function:

const workerAddon = `
self.onmessage = function (e) {
const worker = workerFactory(workerAddon)

Package CSS

<link rel="stylesheet" href="">

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

Specify CJS Exports

If you get an error like ...not provide an export named..., that means can not resolve CJS exports of the module correctly. You can add ?cjs-exports=foo,bar query to specify the export names:

import { NinetyRing, NinetyRingWithBg } from ",NinetyRingWithBg"

Deno Compatibility resolves 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 uses a fixed version of You can add the ?deno-std=$VER query to specify a different version:

import postcss from ""

X-Typescript-Types Header

You may find the X-TypeScript-Types header in response from if the module has a types field in package.json. This allows Deno to automatically download the type definitions for types checking and auto-completion (link).

Figure #1

You can add the ?no-dts query to disable the X-TypeScript-Types header if the types is incorrect:

Pinning Build Version

Since we update server frequently, the server will rebuild all modules when a patch pushed, sometimes we may break packages that work well before by mistake. To avoid this, you can pin the build version of a module with the ?pin query, this returns an immutable cached module.

import React from ""

Using CLI Script provides a CLI script to manage the imports with import maps in Deno, it resolves dependencies automatically and always use a pinned build version. To use the CLI script, 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 esm:[add/update/remove] commands to manage imports of NPM in the import maps.

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


Which browsers are supported? supports all modern browsers which support ES6 Module. Including Deno.

Does support Nodejs?

No, is a CDN for browser/deno, it does not support Nodejs.

Does support private npm packages?

No, but you can deploy your own server to support private npm packages. Check our self hosting guide.

Why I get timeout error?

When first time you import a module, will build the module and cache it. If the module is too large, it may take a long time to build. You can try again later, it's queued and will be built soon.

Why I get ...not provide an export named... error?

That means the server can not resolve the CommonJS exports correctly. You can manually add ?cjs-exports=foo,bar query to fix this issue. For example,,useState,useEffect.

Why I get The source code is invalid... error in Deno?

Since Deno 1.18+ will generate the deno.lock file for the dependencies, but builds code with different version of esbuild when you imports modules from different build version. To fix this issue, please try to pin the build version like Or use the CLI Script to manage the dependencies that will fix the build version automatically.

How can I report a bug?

Please open an issue on GitHub. Thanks :)