You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon debug, bathPath is evaluated (as expected) as project_root/node_modules.
Images are not being copied from project_root/node_modules/some_lib/an_image.gif as I want however it is only copying images referenced in CSS from project_root/css into project_root/dist/assets/images.
I.e. the basePath seems to do the opposite of what it should be doing. Can anyone please explain why it is doing this?
The text was updated successfully, but these errors were encountered:
The postcss-url plugin is meant to process URLs within CSS files. The base path indicates where those URLs should be resolved from. As such, it'll only process the resources referenced in CSS files.
If you would like to copy all images from a specific folder regardless of their use in CSS, I'd suggest looking at other plugins such as:
for Webpack: copy-webpack-plugin
for Rollup: rollup-plugin-smart-asset
If the issue is that the wrong resources are copied, this could be due to the use of relative URLs, in which case the plugin seems to ignore the base path. For example,
url(../images/hello.png) would be resolved from the parent folder
url(images/hello.png) would be resolved from the base path
I'm seeing a strange result with the below config:
Upon debug,
bathPath
is evaluated (as expected) asproject_root/node_modules
.Images are not being copied from
project_root/node_modules/some_lib/an_image.gif
as I want however it is only copying images referenced in CSS fromproject_root/css
intoproject_root/dist/assets/images
.I.e. the basePath seems to do the opposite of what it should be doing. Can anyone please explain why it is doing this?
The text was updated successfully, but these errors were encountered: