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
antd-mobile按需加载 The "injectBabelPlugin" helper has been deprecated as of v2.0 #3094
Comments
yarn add less
yarn add --dev react-app-rewired customize-cra less-loader // config-overrides.js
const {
addLessLoader,
fixBabelImports,
override
} = require("customize-cra");
module.exports = {
webpack: override(
addLessLoader({
javascriptEnabled: true
}),
fixBabelImports("babel-plugin-import", {
libraryName: "antd-mobile",
style: true
})
)
};
|
非常感谢提供的解决办法! |
const { module.exports = override( thanks |
style-loader 升级了,导致dev 环境antd-mobile 按需引入的样式获取不到,降级即可,bye bye! |
Reproduction link
https://mobile.ant.design/docs/react/introduce-cn
Steps to reproduce
按照文档安装
babel-plugin-import
之后,npm start之后无法启动服务。报错:The "injectBabelPlugin" helper has been deprecated as of v2.0. You can use customize-cra plugins in replacement - https://github.com/arackaf/customize-cra#available-plugins。 injectBabelPlugin已经不支持了,要换成customize-cra。What is expected?
希望文档更新一下。config-overrides.js配置如下:
What is actually happening?
The "injectBabelPlugin" helper has been deprecated as of v2.0. You can use customize-cra plugins in replacement
实际版本2.2.9
The text was updated successfully, but these errors were encountered: