I have this on a TypeScript project, it's a nice config option on tsconfig.json that lets me create aliases for the folders
{
"compilerOptions": {
"paths": {
"@src/*": ["src/*"],
"@images/*": ["src/assets/images/*"],
"@styles/*": ["src/assets/styles/*"],
"@components": ["src/components"],
"@layout/*": ["src/layout/*"],
"@pages/*": ["src/pages/*"]
}
}
Is there a way to do the same on a project that does not use TypeScript, just regular Javascript in node with ES6 modules on?