-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat(stylus): 添加stylus支持 #3483
feat(stylus): 添加stylus支持 #3483
Conversation
修改了两个模块 af-webpack 和 umi-build-dev
Ant Design Pro preview using the current branch umi Built with commit 18a9bbd |
Pull Request Test Coverage Report for Build 8149
💛 - Coveralls |
@@ -9,6 +9,9 @@ const DEFAULT_BROWSERS = [ | |||
'not ie < 9', // React doesn't support IE8 anyway | |||
]; | |||
|
|||
const DEFAULT_STYLUS_LOADER = 'stylus-loader'; | |||
const DEFAULT_STYLUS_OPTIONS = { preferPathResolver: 'webpack' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里没必要常量
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ycjcl868 我一般写工具都比较灵活,这里主要是配合配合解构,现在的代码合并不了,是这个原因吗?这个工程运行npm run test
报错某个文件找不到,目前先build模块代码,把build后的几个文档复制到本地demo中测试正常。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ycjcl868 请问本地如何跑单元测试,如何指定build哪几个模块,能不能在工程中加一个readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorrycc 好滴,没问题就尽快合并吧!
需要加一个用例。 |
主要修改af-webpack模块
在af-webpack模块下增加了一个stylus的单元测试,yarn debug af-webpack模块正常,现在需要怎么弄?@sorrycc |
请教一下,我正在使用Umi |
@Wxh16144 umi3废弃调了之前的webpack配置重新写了,所以这代码不见了 |
export default {
// ... more config
chainWebpack(config, { createCSSRule }) {
createCSSRule({
lang: 'stylus',
type: 'csr',
test: /\.styl$/,
loader: 'stylus-loader',
});
},
} |
修改了两个模块 af-webpack 和 umi-build-dev
Checklist
npm test
passesDescription of change