Created
September 15, 2023 05:43
-
-
Save osamajavaid/3cbd3b65f8c39d440b6eae5331849fac to your computer and use it in GitHub Desktop.
This file contain aliasing for reactjs folder structure and svgr package for importing svg icons as react components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import react from '@vitejs/plugin-react'; | |
import svgr from "vite-plugin-svgr"; | |
export default { | |
plugins: [react(), svgr()], | |
server: { | |
port: 8081, | |
}, | |
resolve: { | |
alias: [ | |
{ find: '@', replacement: '/src' }, | |
{ find: '@routes', replacement: '/src/routes' }, | |
{ find: '@components', replacement: '/src/components' }, | |
{ find: '@common', replacement: '/src/components/common' }, | |
{ find: '@pages', replacement: '/src/pages' }, | |
{ find: '@layouts', replacement: '/src/layouts' }, | |
{ find: '@constants', replacement: '/src/constants' }, | |
{ find: '@assets', replacement: '/src/assets' }, | |
{ find: '@utils', replacement: '/src/utils' }, | |
{ find: '@styles', replacement: '/src/styles' }, | |
// Add more aliases as needed | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment