Skip to content
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

error on such 'background:url(./image/test.svg)' #8

Closed
Dpy0407 opened this issue Sep 7, 2018 · 7 comments
Closed

error on such 'background:url(./image/test.svg)' #8

Dpy0407 opened this issue Sep 7, 2018 · 7 comments

Comments

@Dpy0407
Copy link

Dpy0407 commented Sep 7, 2018

For webpack result (config the image resource to outputDir), the compile result will be 'background:url(outputDir/image/test.svg)' & webpack will copy the image resource to the outputDir, it will work well.
But for 'antd-theme-generator', its result will be 'background:url(image/test.svg)' , but the test.svg be put in outPutDir by webpack, so this url will work wrong.
I think if is better to ignore this situation when background is a url resource? Briefly, once antd-theme-generator find the background is a url, just ignore, don't generator this part?

@mzohaibqc
Copy link
Owner

@Dpy0407 Update to latest version and it will be fixed. At the time of writing, it is [email protected]

@exvu
Copy link

exvu commented Aug 20, 2019

@Dpy0407 Have you solved this problem?

@Dpy0407
Copy link
Author

Dpy0407 commented Aug 20, 2019

@exvu sorry, I am working on another project now, So, I am not sure if the problem has been solved. maybe you can have a try, as @mzohaibqc said that it has been solved after version @1.1.6

@6thpath
Copy link

6thpath commented Oct 9, 2019

problem still there, I'm using antd-theme-generator@^1.1.7

@jokingzhang
Copy link

problem still there, I'm using antd-theme-generator@^1.1.9

@andylidong
Copy link

andylidong commented Apr 22, 2020

In the reduceplugin method, you can add the following code:
background => background-image
image
if (decl.prop.includes("background-image")) {
decl.remove();
}

mzohaibqc added a commit that referenced this issue Apr 25, 2020
mzohaibqc added a commit to mzohaibqc/antd-theme-webpack-plugin that referenced this issue Apr 25, 2020
@mzohaibqc
Copy link
Owner

mzohaibqc commented Apr 25, 2020

@Dpy0407 @exvu @lPaths @jokingzhang

This issue has been resolved and package version has been updated
use [email protected] in order to fix this issue

If you are using antd-theme-webpack-plugin then you need to use version 1.3.2

Thanks a lot, @andylidong for this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants