parcel-antd icon indicating copy to clipboard operation
parcel-antd copied to clipboard

Error with antd 4.x & @ant-design/icons

Open SirM2z opened this issue 4 years ago • 0 comments

  • dependencies
"@ant-design/icons": "^4.3.0",
"antd": "^4.9.4",
  • import @ant-design/icons in app.tsx
import { SettingOutlined } from '@ant-design/icons';

// ...

const App = () => {
  return (
    <SettingOutlined />
  )
}

The command npm run dev works.

After npm run build, then serve dist.

The page will go wrong.

  • error message: Uncaught TypeError: Cannot read property 'TinyColor' of undefined

image

SirM2z avatar Dec 19 '20 11:12 SirM2z