Alias auto generation for Vite
The Vite Aliases theme is designed to simplify folder structures by creating convenient shortcuts based on the first layer of folders. By following the installation steps, users can easily generate aliases that optimize workflow in their development environment.
To install the Vite Aliases theme, follow these steps:
Add the theme to vite.config.js.
import ViteAliases from 'vite-aliases';
export default {
plugins: [ViteAliases()],
};
Add the plugin to package.json.
Note: The plugin is only available for ESM.
{
"type": "module",
"main": "index.js",
"scripts": {
"dev": "vite"
},
"devDependencies": {
"vite": "^2.0.0"
}
}
The Vite Aliases theme simplifies the process of creating and using shortcuts in the development environment. By adhering to the default configuration and utilizing the adjust duplicates feature when necessary, users can streamline their workflow effectively. Inspired by other projects, this theme is licensed under the MIT License by Leon Langer.