I'm sure this is obvious, but I'm not seeing why this isn't working at the moment...
I have a file in a Vue project that exports keycodes in a couple different formats, one to be used for constants (allCodes
) and another to be used for Vue (keyCodes
):
export default {
allCodes,
keyCodes
};
When I try to import one of them using deconstruction like this, I get an error:
import { allCodes } from '@/helpers/keycodes';
21:17-25 "export 'allCodes' was not found in '@/helpers/keycodes'
warning in ./src/mixins/GlobalKeyPressHandler.js
However, importing then referring to the key by name works:
import object from '@/helpers/keycodes';
console.log('allCodes', object.allCodes);
What gives?