We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DEFAULT_DURATION
ant
Thanks for the great project. It's so fast and ready to replace our current projects except the following issue.
Steps to reproduce:
bun create farm@latest farm-test bun i antd # update `main.tsx` with the following content bun run build
import './main.css' import zhCN from 'antd/locale/zh_CN' import { ConfigProvider, message } from 'antd' import { useEffect } from 'react' export function Main() { useEffect(() => { message.info('Hello, Ant Design!') }, []) return ( <ConfigProvider locale={zhCN} theme={{ cssVar: true, hashed: false, token: { colorPrimary: '#8473FF', colorLink: '#8473FF', colorInfo: '#8473FF', borderRadius: 2, }, components: { Menu: { darkItemBg: 'transparent', darkItemColor: 'black', darkItemHoverBg: '#8473FF', itemBorderRadius: 4, itemPaddingInline: 30, }, Button: { borderRadius: 4, }, }, }} > <div>123</div> </ConfigProvider> ) }
https://github.com/erguotou520/farm-ant-issue
After build, run npx farm preview, the error shows in the console
npx farm preview
Uncaught ReferenceError: DEFAULT_DURATION is not defined
The reproduce repo just use the message.info function which cause the error. The error DEFAULT_DURATION refers to the code https://github.com/ant-design/ant-design/blob/master/components/message/useMessage.tsx#L64
message.info
System: OS: macOS 12.5 CPU: (8) arm64 Apple M1 Memory: 108.52 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node Yarn: 1.22.22 - ~/.yarn/bin/yarn npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm pnpm: 8.5.1 - ~/Library/pnpm/pnpm bun: 1.1.12 - ~/.bun/bin/bun npmPackages: @farmfe/core: ^1.1.13 => 1.2.0
The text was updated successfully, but these errors were encountered:
because of treeShaking, you can disable it by setting complation.treeShaking to false in farm.config.ts. we will notify you when we fix it later.
complation.treeShaking
farm.config.ts
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Thanks for the great project. It's so fast and ready to replace our current projects except the following issue.
Steps to reproduce
Steps to reproduce:
bun create farm@latest farm-test bun i antd # update `main.tsx` with the following content bun run build
Reproduce link
https://github.com/erguotou520/farm-ant-issue
What is actually happening?
After build, run
npx farm preview
, the error shows in the consoleThe reproduce repo just use the
message.info
function which cause the error. The errorDEFAULT_DURATION
refers to the code https://github.com/ant-design/ant-design/blob/master/components/message/useMessage.tsx#L64System Info
The text was updated successfully, but these errors were encountered: