Example 1 — Syntax shape
What it looks like.
JavaScript
console.log('import data from "./data.json" with { type: "json" };');How It Works
- Shown as a documented form.
- Runtime support varies.
Import attributes (formerly assertions) pass metadata to the loader, e.g. with { type: "json" } for JSON modules.
console.log('import data from "./data.json" with { type: "json" };');What it looks like.
console.log('import data from "./data.json" with { type: "json" };');CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
6 people found this page helpful