.esmrc.json
Configuration files for the esm module/package in Node.js
| Type | object |
|---|---|
| File match |
.esmrc
.esmrc.json
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/esmrc-json/latest.json |
| Source | https://www.schemastore.org/esmrc.json |
Validate with Lintel
npx @lintel/lintel check
Type:
object
Properties
cjs
boolean | object
A boolean or object for toggling CJS features in ESM
mainFields
string[]
An array of fields checked when importing a package
[
"main"
]
uniqueItems=true
mode
string
A string describing the mode in which to detect ESM module files
const: "auto" const: "auto", const: "all" const: "all", const: "strict" const: "strict"
await
boolean
A boolean for top-level await in modules without ESM exports. (Node 10+)
force
boolean
A boolean to apply these options to all module loads
wasm
boolean
A boolean for WebAssembly module support. (Node 8+)
cache
boolean
[dev] A boolean for toggling cache creation or a cache directory path
sourceMap
boolean
[dev] A boolean for including inline source maps