-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix icon in package theme #2
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
|
||
module.exports = () => { | ||
|
||
return { | ||
'@primary-color': '#1DA57A', | ||
'@link-color': '#1DA57A', | ||
'@border-radius-base': '2px', | ||
'@icon-url': '/assets/fonts/iconfont/iconfont' | ||
'@icon-url': '"/assets/fonts/iconfont/iconfont"', | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,33 @@ module.exports = function (webpackConfig, env) { | |
webpackConfig.babel.plugins.push('transform-runtime'); | ||
webpackConfig.babel.plugins.push(['import', { | ||
libraryName: 'antd', | ||
style: 'css' // if true, use less | ||
style: true, | ||
}]); | ||
|
||
// Enable hmr for development. | ||
if (env === 'development') { | ||
webpackConfig.babel.plugins.push('dva-hmr'); | ||
} | ||
|
||
|
||
// CSS Modules Support. | ||
// Parse all less files as css module. | ||
webpackConfig.module.loaders.forEach(function (loader, index) { | ||
webpackConfig.module.loaders.forEach(function(loader, index) { | ||
if (typeof loader.test === 'function' && loader.test.toString().indexOf('\\.less$') > -1) { | ||
loader.test = /\.dont\.exist\.file/; | ||
loader.include = /node_modules/; | ||
loader.test = /\.less$/; | ||
} | ||
if (loader.test.toString() === '/\\.module\\.less$/') { | ||
loader.exclude = /node_modules/; | ||
loader.test = /\.less$/; | ||
} | ||
if (typeof loader.test === 'function' && loader.test.toString().indexOf('\\.css$') > -1) { | ||
loader.include = /node_modules/; | ||
loader.test = /\.css$/; | ||
} | ||
if (loader.test.toString() === '/\\.module\\.css$/') { | ||
loader.exclude = /node_modules/; | ||
loader.test = /\.css$/; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}); | ||
|
||
return webpackConfig; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What makes u fail is missing the
"
.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.
{test: /.woff(?v=\d+.\d+.\d+)?$/, loader: 'url?limit=100000&minetype=application/font-woff'},
{test: /.woff2(?v=\d+.\d+.\d+)?$/, loader: 'url?limit=100000&minetype=application/font-woff'},
{test: /.ttf(?v=\d+.\d+.\d+)?$/, loader: 'url?limit=100000&minetype=application/octet-stream'},
{test: /.eot(?v=\d+.\d+.\d+)?$/, loader: 'file'},
{test: /.svg(?v=\d+.\d+.\d+)?$/, loader: 'url?limit=100000&minetype=image/svg+xml'},
cannot work!!!!!
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.
使用相对路径会报错,绝对路径会导致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.
@chenxiaojie 后面有解决吗
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.
@chenxiaojie 今天花了两个小时研究,发现同样的问题,真是无语,建议antd团队将字体文件随包发布,而需要CDN引用的再定义modifyVars
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.
@phantom0424 没有解决,不优雅的解决了。
将字体和图片放在本项目里面,自己再写一份覆盖。
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.
这个双引号问题确实折腾半天,后来恍然大悟