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

TypeError: $ is not a function #1049

Closed
NARUTOne opened this issue Mar 11, 2022 · 1 comment
Closed

TypeError: $ is not a function #1049

NARUTOne opened this issue Mar 11, 2022 · 1 comment
Labels
question Further information is requested

Comments

@NARUTOne
Copy link

Question

由于开发组件需要按需antd组件样式,所以使用antd组件的时候使用了 antd/es/xx/style 这种模式
image
使用dumi打包文档的时候,报错了
image
image

Sample Code

.umirc.js中配置了

 extraBabelPlugins: [
    [
      'import',
      {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: true,
      },
      'antd',
    ],
  ],

dumi 1.1.39

@NARUTOne NARUTOne added the question Further information is requested label Mar 11, 2022
@NARUTOne
Copy link
Author

发现是 babel配置影响的... 😢
Compiles in dev, fails in prod: TypeError: $ is not a function

@NARUTOne NARUTOne changed the title antd/es/xx/style 支持 TypeError: $ is not a function Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant