canirequire

canirequireESM-only › @vueuse/core

Is @vueuse/core ESM-only? Can you require() it?

Collection of essential Vue Composition Utilities

Last verified Sep 9, 2026 against @vueuse/core@14.4.0. JSON

ESM-only ESM-only since 13.0.0 — last CommonJS version is 12.8.2

@vueuse/core dropped its CommonJS build in 13.0.0 (March 2025). The last version you can require() on every Node.js version, including 18 and older, is 12.8.2, published Mar 5, 2025.

On Node.js 20.19+, 22.12+ and every newer release, require("@vueuse/core") works anyway: Node can load synchronous ES modules through require(). Verified on Node 20, 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM.

Latest
14.4.0 (Jul 29, 2026)
Module format
ESM-only
Last CommonJS version
12.8.2
ESM-only since
13.0.0 (Mar 10, 2025)
TypeScript types
Bundled
Node engines
not declared
License
MIT

Does @vueuse/core@14.4.0 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@vueuse/core") from a CommonJS file and import "@vueuse/core" from an ES module.

Runtimerequire("@vueuse/core")import "@vueuse/core"
Node.js 18✗ failsERR_REQUIRE_ESM✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4✓ works✓ works

How to import @vueuse/core

ES modules (import)

import core from "@vueuse/core";

CommonJS (require)

// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const core = require("@vueuse/core");

// Any Node.js version:
const core = await import("@vueuse/core");

// Or pin the last CommonJS release:
// npm install @vueuse/core@12.8.2

Module format by version

Derived from the type, main and exports fields of every stable release on npm (271 versions; the newest 60 shown).

VersionsFormatFirst published
13.0.0 – 14.4.0ESM-onlyMar 10, 2025
9.11.0 – 12.8.2Dual (CommonJS + ESM)Jan 17, 2023

Frequently asked

Is @vueuse/core ESM-only?

@vueuse/core@14.4.0 is ESM-only. @vueuse/core dropped its CommonJS build in 13.0.0 (March 2025). The last version you can require() on every Node.js version, including 18 and older, is 12.8.2, published Mar 5, 2025.

Which version of @vueuse/core still supports CommonJS / require()?

12.8.2 is the last version of @vueuse/core with a CommonJS build. Install it with "npm install @vueuse/core@12.8.2". Every version from 13.0.0 on is ESM-only.

How do I use @vueuse/core from a CommonJS file?

Use a dynamic import: const mod = await import("@vueuse/core"). On Node.js 20.19+, 22.12+ and newer, a plain require("@vueuse/core") also works for ESM packages that do not use top-level await. Alternatively pin @vueuse/core@12.8.2.

Does @vueuse/core work in Bun?

Yes. import "@vueuse/core" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @vueuse/core ship TypeScript types?

Yes. @vueuse/core bundles its own type declarations; no @types package is needed.

Links

Other esm-only packages

Similar popularity