import_attributes
An import or re-export carries import attributes (with or assert).
An import or re-export carries import attributes (with or assert).
| Kind | Build or validation problem |
| Reported by | Archive and source validation |
disko exit code | 1 (problems) |
An import or export … from carries import attributes, written with with
or the older assert. Attributes are not allowed; the file's extension alone
decides how it is loaded.
Why it happens
Import attributes are mostly used to import JSON (with { type: "json" }).
JSON is not a package file type, so keep the data in a .js or .ts module.
Wrong
src/main.js
Right
src/main.js