Importing JSON with a syntax the runtime enforces, rather than with a bundler plugin that made it look like a module.
import config from './config.json' with { type: 'json' }
// which works in the browser and in Node without a
// loader, and fails loudly if the server sends the
// wrong content type.
// what it replaces: a bundler plugin that inlined the
// file at build time, so the import worked in the
// bundle and not in a test that ran without one.
The attribute is a security feature rather than a convenience — without it, a module could be served as JSON and executed as JavaScript by a server that changes its content type. The practical gain here was removing a build-time difference between the bundled and unbundled code paths, which had produced one confusing test failure a year.