DenoDDeno
Powered by
Jayden SericJ
Denoβ€’15mo ago
Jayden Seric

Does Deno block deep imports of modules not whitelisted in the `deno.json` field `exports`?

Question: Does the
deno.json
deno.json
field
exports
exports
cause Deno to block deep import access to any modules not whitelisted in the declared exports, like how Node.js
package.json
package.json
field
exports
exports
works?

The Deno config docs doesn't mention the
exports
exports
field (why?!!):

https://docs.deno.com/runtime/fundamentals/configuration/

The Intellisense for the field contains "this JSR package" (which seems wrong to assume this is a JSR package, is the field only used by JSR?), and it doesn't explain the full behavior:

https://deno.land/x/deno@v2.1.4/cli/schemas/config-file.v1.json?source=#L583
Deno
deno.json and package.json
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
deno.json and package.json
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

deno.json glob exports
JadJJad / help
12mo ago
Cache imports in deno.json
NebulaRhythmNNebulaRhythm / help
3y ago
Local Deno package imports: Use package's deno.json config "exports" map?
moodringMmoodring / help
10mo ago
Workspace documentation lacks explanation of `exports` member in deno.json
Rob SRRob S / help
14mo ago