I have a function that uses some constants that are exported in seperate file.
If I import the constants inside the function it is not working :
export function findLocalizedLabelForValueDomainCode(...) {
import LOCALE from './constants';
// doing staff
}
however if I replace :
import LOCALE from './constants';
by
let cst = require( './constants');
it works... have you an idea why I cant use the import syntax in this case ?
FYI : My project is using ES6