Comments (3)
如果基于 atool-build,参考脚手架:
https://github.com/ant-design/antd-init/blob/master/boilerplate/webpack.config.js#L2-L4
如果直接基于 webpack,修改 .babelrc:
https://github.com/ant-design/babel-plugin-antd#via-babelrc
from babel-plugin-import.
按照文档写的还是报错
.babelrc中
{
presets: ['react', 'es2015', 'stage-0'],
plugins: ['antd', {style: 'css'}]
}
报错:Module build failed: Error: Plugin 1 specified in "/Users/cnfi/Documents/xxxxx/.babelrc" provided an invalid property of "style"
from babel-plugin-import.
https://github.com/ant-design/babel-plugin-antd#usage
注意格式。
from babel-plugin-import.
Related Issues (20)
- 编译报错了啊,哥哥 HOT 1
- [email protected]版本bug HOT 1
- 公告:1.13.4 的问题说明 HOT 15
- AssignmentPattern 的情况是否应该考虑一下?
- HELP!!! how i can use this in rollup!!!
- 使用yalc开发组件库,工程不能随时更新
- When using the plugin, I got warnings on Netlify about "Conflicting order. Following module has been added:"
- add LICENSE.md
- 只想要import样式文件,能不能不要帮我处理js文件? HOT 1
- 是我配置的姿势不对吗,毛用都没有 HOT 1
- unable to resolve dependency tree
- babel-plugin-import 对 ts语法 ( Com as any ) 和 带装饰器的 class extends Com 支持有问题 HOT 1
- babel-plugin-import与babel-plugin-istanbul冲突
- plugin 中 第三个参数作用
- 不知道为什么打包后会有引入node_modules/antd/es/index.js的代码 HOT 1
- 局部变量和 import 重名 插件转换有问题
- ImportDeclaration(path, state){} 监听 可以会比 CallExpression(path, state) {} 监听 后执行。
- 使用了thread-loader后,customName配置项失效
- 1.13.7 驼峰转换有问题,导致构建报错找不到组件 HOT 1
- 命名转换方法导致其他组件报错的问题。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-import.