Constants.js
const CONTACT_SCHEMA = {
CONTACT: CONTACT_OBJECT,
FIRSTNAME: FIRSTNAME_FIELD,
LASTNAME: LASTNAME_FIELD,
EMAIL: EMAIL_FIELD,
PHONE: PHONE_FIELD,
FAX: FAX_FIELD
};
export default CONTACT_SCHEMA;
CreateContact.js
import { CONTACT_SCHEMA } from 'Constants';
How can I import CONTACT_SCHEMA from Constants.js into CreateContact.js
Here I am using this thing in lightning web component. I write all constants in the constants.js file and now i want to use these constants in the CreateContact file. But it's giving some error
Invalid reference Constants of type module in file createContact.js