小编Tha*_*Son的帖子

使用 Vite 和 Antd Pro Layout 时没有该文件或目录

使用 Vite 和 Antd Pro Layout 时没有该文件或目录

这是文件 vite.config.ts:

import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import path from 'path';
import vitePluginImp from 'vite-plugin-imp';

export default defineConfig({
  plugins: [
    reactRefresh(),
    vitePluginImp({
      libList: [
        {
          libName: 'antd',
          style: (name) => {
            return `antd/lib/${name}/style/index.less`;
          },
        },
      ],
    }),
  ],
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        modifyVars: {
          ...{
            'primary-color': '#1DA57A',
            'link-color': '#1DA57A',
            'border-radius-base': '2px',
          },
        },
      },
    },
  },
  resolve: {
    alias: [
      {
        find: /^~/,
        replacement: …
Run Code Online (Sandbox Code Playgroud)

antd ant-design-pro vite

6
推荐指数
2
解决办法
6203
查看次数

标签 统计

ant-design-pro ×1

antd ×1

vite ×1