Comments (6)
这个可以参照 ant.design的说明
from react-antd-admin.
不知什么原因,去掉true的双引号又好了。昨天试了好久都没成功:
{
"presets": [
["env", { "modules": false }],
"react",
"stage-2"
],
"plugins": ["lodash",
"react-hot-loader/babel",
"syntax-dynamic-import",
"transform-runtime",
"transform-decorators-legacy", ["import", [{ "libraryName": "antd", "libraryDirectory": "lib", "style": true }]]
],
"env": {
"test": {
"presets": ["env", "react", "stage-2"]
}
}
}
from react-antd-admin.
我发现我的项目没有把antd的样式打包到css文件中,而你的项目却可以把antd的样式打包到css文件中。
你是做什么配置或者加了什么条件语句么?
from react-antd-admin.
我的配置是 "style": "css"
, 你可以提供一下你具体的配置吗,babel-plugin-import
似乎对 code split 支持不太好
from react-antd-admin.
不管是设为css还是true都是没有打包antd样式。
我是copy你的build、config的文件夹,webpack的配置一模一样,唯一不一样的是,我用的路由是异步加载的。
react-router-code-splitting
不知跟这个有没有关系呃!
from react-antd-admin.
关于 extract-text-webpack-plugin
和 webpack 的 code split
兼容,babel-plugin-import
有未解决bug, 可以跟踪一下 umijs/babel-plugin-import#130
from react-antd-admin.
Related Issues (20)
- 右上角的 Notification通知提醒框遮挡了 注销... 等操作
- Error at logout HOT 8
- fix warning about PropTypes HOT 1
- React.creatClass is deprecated
- upgrade React to 15.6 or higher
- Error: Cannot find module '../src/components/Header/Header' when npm run test
- sh: now: command not found when npm run deploy HOT 2
- top nav for sidebar
- console print error: Uncaught TypeError: Cannot read property 'key' of undefined
- Hot reload not working very well
- remove extra validate function
- confused with router HOT 2
- what about browserHistory? HOT 2
- webpack source map doesent work? HOT 7
- 如何在一个action执行成功之后调用另外一个Action,比如保存数据成功后查询数据 HOT 1
- close HOT 2
- npm run build 提示内存溢出是怎么回事啊 HOT 8
- 可以使用严格点的语法吗,好多Import in body of module; reorder to top import/first HOT 1
- 我按照流程运行了项目 但是报错了 报不能解析jsx的错误
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 react-antd-admin.