Native JSON module imports using import attributes (`with { type: 'json' }`) are now supported natively in browsers, Node, Deno, and Bun — no bundler or build step required. The explicit type declaration removes ambiguity about how the runtime should handle the file, enables standard ESM caching semantics, and follows normal
Table of contents
Why do we need with { type: "json" } ?What you actually get when you import JSONBundlers vs. native JSON modulesModule cachingDo we still need bundlers for JSON?Why this matters beyond JSON2 Comments
Sort: