There seems to be a slight issue that I can't quite figure out at the moment...
In my Vue project, I have a file that exports keycodes in two different formats: one for constants (allCodes
) and another for Vue (keyCodes
):
export default {
allCodes,
keyCodes
};
Trying to import one of them using deconstruction like this results in an error:
import { allCodes } from '@/helpers/keycodes';
21:17-25 "export 'allCodes' was not found in '@/helpers/keycodes'
warning in ./src/mixins/GlobalKeyPressHandler.js
But importing and then referring to the key by name works just fine:
import object from '@/helpers/keycodes';
console.log('allCodes', object.allCodes);
Any idea what might be causing this discrepancy?