-
-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
<Spin /> error when compiling css #4915
Comments
It's recommended to use atool-build's config https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js Could you provide re-producible repo? |
Edit: maybe your loader doesn't support this syntax? filter: progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false); |
Could you share you webpack config? Push you code to a git repo and I will check it later. |
Here is a trimmed down copy of my current project: https://github.com/coljung/help-test/tree/master/antd-repo-help/ui-store Also, the problem seems to be affecting other components. I just tried using the 'loading' option for the 'Table' component, and it seems to be missing a lot of the styles associated with that as well. No errors whatsoever on my compiler or on page load. |
@coljung try to separate less's config and css's config. See: https://github.com/coljung/help-test/blob/master/antd-repo-help/ui-store/webpack.config.js#L35 You are using less-loader to process CSS, and it seems that less-loader doesn't support this syntax: filter: progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false); |
Like what @benjycui said, try not to parse css via less-loader. https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js#L108-L116 |
Yes, the problem is that i've tried to replicate the config from atool-build, and i get webpack error everytime. If i use this:
I get this errors when trying to run webpack: I've tried modifying the above script multiple times, but i havent been able to find the right setup to compile properly. |
well, i changed my webpack to this:
and the components works. thx |
@afc163 sass isn't any better |
I changed webpack.config.dev.js and works, thx |
An update to my current configuration using Webpack 3:
|
webpack.dev.config.js?
walle89729
邮箱:walle89729@gmail.com
签名由 网易邮箱大师 定制
On 01/19/2018 21:58, Pablo Rincon wrote: An update to my current configuration using Webpack 3:
module: {
rules: [
{
test: /(\.js|\.jsx)$/,
exclude: /(node_modules)/,
use: ['babel-loader'],
},
{
test: /(\.css)$/,
use: ExtractTextPlugin.extract({
fallback: [{
loader: 'style-loader',
}],
use: [
{
loader: 'css-loader',
options: {
minimize: true,
},
},
],
}),
},
{
test: /(\.less)$/,
use: ExtractTextPlugin.extract({
fallback: [{
loader: 'style-loader',
}],
use: [
'css-loader',
'less-loader',
],
}),
},
{
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
loader: 'url-loader?limit=50000&name=[path][name].[ext]',
},
],
},
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/ant-design/ant-design","title":"ant-design/ant-design","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/ant-design/ant-design"}},"updates":{"snippets":[{"icon":"PERSON","message":"@coljung in #4915: An update to my current configuration using Webpack 3:\r\n\r\n```\r\nmodule: {\r\n rules: [\r\n {\r\n test: /(\\.js|\\.jsx)$/,\r\n exclude: /(node_modules)/,\r\n use: ['babel-loader'],\r\n },\r\n {\r\n test: /(\\.css)$/,\r\n use: ExtractTextPlugin.extract({\r\n fallback: [{\r\n loader: 'style-loader',\r\n }],\r\n use: [\r\n {\r\n loader: 'css-loader',\r\n options: {\r\n minimize: true,\r\n },\r\n },\r\n ],\r\n }),\r\n },\r\n {\r\n test: /(\\.less)$/,\r\n use: ExtractTextPlugin.extract({\r\n fallback: [{\r\n loader: 'style-loader',\r\n }],\r\n use: [\r\n 'css-loader',\r\n 'less-loader',\r\n ],\r\n }),\r\n },\r\n {\r\n test: /\\.(gif|jpg|png|woff|svg|eot|ttf)\\??.*$/,\r\n loader: 'url-loader?limit=50000\u0026name=[path][name].[ext]',\r\n },\r\n ],\r\n },\r\n```"}],"action":{"name":"View Issue","url":"#4915 (comment)"}}}
|
I try to separate node_modules css config and my css config, then it is worked. My webpack version is 4.
|
the code 'filter: ~"progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)"' can be modified as 'filter: "progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)"' or 'filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)' and it is ok like that. I don't understand why the source code like that. |
For some reason, if I include the 'Spin' component on my page, I get a webpack compiling error:
I assume it has something to do with the progid IE9 rules.
Now, so far my other components work fine.
I suppose I could fix this with some sort of webpack configuration tweak ?
btw, my current webpack configuration looks like this:
Please note that so far this is the only component causing this issue.
The text was updated successfully, but these errors were encountered: