fix: icon library resolution (#74)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import { resolve } from 'path';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
const root = resolve(__dirname, '../src');
|
||||
@@ -11,16 +12,16 @@ console.log(root);
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
src: root,
|
||||
'@assets': assetsDir,
|
||||
'@pages': pagesDir,
|
||||
'@public': publicDir,
|
||||
'@shared': resolve(root, 'shared'),
|
||||
'@background': resolve(pagesDir, 'background'),
|
||||
'@views': resolve(root, 'views'),
|
||||
plugins: [react(), Icons({ compiler: 'jsx', jsx: 'react' })],
|
||||
resolve: {
|
||||
alias: {
|
||||
src: root,
|
||||
'@assets': assetsDir,
|
||||
'@pages': pagesDir,
|
||||
'@public': publicDir,
|
||||
'@shared': resolve(root, 'shared'),
|
||||
'@background': resolve(pagesDir, 'background'),
|
||||
'@views': resolve(root, 'views'),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user