mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 04:17:27 +00:00
Merge pull request #1810 from QuentinHsu/feature/alias-path
feat: add jsconfig.json and configure path aliases
This commit is contained in:
9
web/jsconfig.json
Normal file
9
web/jsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["src/**/*"]
|
||||||
|
}
|
||||||
@@ -20,10 +20,16 @@ For commercial licensing, please contact support@quantumnous.com
|
|||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import { defineConfig, transformWithEsbuild } from 'vite';
|
import { defineConfig, transformWithEsbuild } from 'vite';
|
||||||
import pkg from '@douyinfe/vite-plugin-semi';
|
import pkg from '@douyinfe/vite-plugin-semi';
|
||||||
|
import path from 'path';
|
||||||
const { vitePluginSemi } = pkg;
|
const { vitePluginSemi } = pkg;
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
{
|
{
|
||||||
name: 'treat-js-files-as-jsx',
|
name: 'treat-js-files-as-jsx',
|
||||||
|
|||||||
Reference in New Issue
Block a user