Babel throws when an import attribute such as import abc from "./abc.json" with { type: "json" } or await import("./abc.json", { assert: { type: "json" } }) is present in a source file; it suggests using @babel/plugin-syntax-import-attributes to resolve the issue.
note: to enable parsing the deprecated import abc from "./abs.json" assert { type: "json" } syntax, the plugin's deprecatedAssertSyntax option must be true (default: false).
Babel throws when an import attribute such as
import abc from "./abc.json" with { type: "json" }orawait import("./abc.json", { assert: { type: "json" } })is present in a source file; it suggests using @babel/plugin-syntax-import-attributes to resolve the issue.note: to enable parsing the deprecated
import abc from "./abs.json" assert { type: "json" }syntax, the plugin'sdeprecatedAssertSyntaxoption must betrue(default: false).