score:0

export default is default export, as the name implies. Regardless of how the variable that holds a value of default export is called, it's supposed to be imported as default import, not named import with brackets:

const legend = ...;
export default legend;

and

import legendCanBeImportedUnderAnyName from "/src/legends.js"

Alternatively, it can be made named export, it also needs to be imported as such:

export const legend = ...;

and

import { legend } from "/src/legends.js"

score:0

Try this.import * as legend from "/src/legends.js";


Related Query

More Query from same tag