Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用@ant-design/pro-* 编译了超多的var变量 #961

Closed
Atw-Lee opened this issue Dec 11, 2023 · 1 comment
Closed

使用@ant-design/pro-* 编译了超多的var变量 #961

Atw-Lee opened this issue Dec 11, 2023 · 1 comment

Comments

@Atw-Lee
Copy link

Atw-Lee commented Dec 11, 2023

Umi Max

// pck.json

  "dependencies": {
    "@ant-design/pro-table": "^2.80.4",
    "@umijs/max": "^4.0.89",
    "antd": "^4"
  },

// .umirc.ts

import { defineConfig } from '@umijs/max';

export default defineConfig({
  // antd: {},
  access: {},
  model: {},
  initialState: {},
  request: {},
  // layout: {
  //   title: '@umijs/max',
  // },
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      name: '首页',
      path: '/home',
      component: './Home',
    },
    {
      name: '权限演示',
      path: '/access',
      component: './Access',
    },
  ],
  theme: {
    'root-entry-name': 'variable',
  },
  npmClient: 'pnpm',
  // analyze: {
  //   analyzerPort: 8888,
  //   openAnalyzer: true,
  // },
});

// home/index

import { EditableProTable } from '@ant-design/pro-table';
import './index.less';
import { Button } from 'antd';

const HomePage: React.FC = () => {
  return (
    <div className="container">
      <Button type="primary">123</Button>
      <EditableProTable />
    </div>
  );
};

export default HomePage;

结果:
生成了超多的var变量
333

期望: 只想要一个

PS:当我关闭root-entry-name后可以,但是@ant-design/pro-*会覆盖我的var动态主题
123

@Atw-Lee Atw-Lee changed the title 使用@ant-design/pro-* 编译了超多的去var变量 使用@ant-design/pro-* 编译了超多的var变量 Dec 11, 2023
@xiaohuoni
Copy link
Member

这个库是 umi@3 的插件,去 umi 主仓库提

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants