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

4m read timeFrom allthingssmitty.com
Post cover image
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 JSON
2 Comments

Sort: