Magento2 : How to call background image in PWA
-
27-02-2021 - |
Question
Solution
I got solution
Create images
folder under src/components/CmsBlock/
add your image in images
folder like text.png
Change in test: /\.(jpg|svg)$/,
to test: /\.(gif|svg|jpg|png)$/,
in webpack.config.js
file.
Open src/components/CmsBlock/cmsBlock.css
file and add below code in CSS file
background: url("./images/text.png") no-repeat left center;
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange