canirequire › Dual (CommonJS + ESM) › @hookform/resolvers
Is @hookform/resolvers ESM-only? Can you require() it?
React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types, TypeBox, arktype, Typanion, Effect-TS and VineJS
Last verified Sep 9, 2026 against @hookform/resolvers@5.9.1. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@hookform/resolvers publishes both a CommonJS entry and a native ESM entry (ESM added in 1.3.6). require("@hookform/resolvers") and import "@hookform/resolvers" both work on every supported Node.js version and in Bun.
Does @hookform/resolvers@5.9.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@hookform/resolvers") from a CommonJS file and import "@hookform/resolvers" from an ES module.
| Runtime | require("@hookform/resolvers") | import "@hookform/resolvers" |
|---|---|---|
| Node.js 18 | ✓ works | ✓ 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 @hookform/resolvers
ES modules (import)
import resolvers from "@hookform/resolvers";CommonJS (require)
const resolvers = require("@hookform/resolvers");Module format by version
Derived from the type, main and exports fields of every stable release on npm (112 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 2.9.3 – 5.9.1 | Dual (CommonJS + ESM) | Jun 24, 2022 |
Frequently asked
Is @hookform/resolvers ESM-only?
@hookform/resolvers@5.9.1 ships CommonJS and ESM builds. @hookform/resolvers publishes both a CommonJS entry and a native ESM entry (ESM added in 1.3.6). require("@hookform/resolvers") and import "@hookform/resolvers" both work on every supported Node.js version and in Bun.
Can I require @hookform/resolvers?
Yes. @hookform/resolvers ships a CommonJS entry, so require("@hookform/resolvers") works on every Node.js version, alongside the native ESM entry for import.
Does @hookform/resolvers work in Bun?
Yes. import "@hookform/resolvers" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @hookform/resolvers ship TypeScript types?
Yes. @hookform/resolvers bundles its own type declarations; no @types package is needed.
Links
Other dual (commonjs + esm) packages
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- process 0.11.10CommonJS
- package-json-from-dist 1.0.1Dual
- terser-webpack-plugin 5.6.1CommonJS
- glob-to-regexp 0.4.1CommonJS
- bluebird 3.7.2CommonJS
- @aws-sdk/middleware-recursion-detection 3.972.46CommonJS
- find-cache-dir 6.0.0ESM-only
- @adobe/css-tools 4.5.0Dual