I have a nuxt project (vuejs) and I'm wondering how to store constants in my project ? ( about 50 constants).
Thank you for your response. kaboume
You can create a constants.js
file:
// constants.js
export const CONSTANT_1 = 'CONSTANT_1';
export const CONSTANT_2 = 'CONSTANT_2';
export const CONSTANT_3 = 'CONSTANT_3';
// And call it like this
import { CONSTANT_1 } from 'constants';