javascript - Questions about webpack packaging
扔个三星炸死你
扔个三星炸死你 2017-06-24 09:43:12
0
1
638

After using webpack to package static resources, please ask how to set the path for some larger image resources.

Because relative paths are used to find resources during development, and this image is relatively large and cannot be packaged into bundle.js.

Then when I put the project in the server, the resource cannot be found. How can I set it up to package and reference it normally. I tried to change the url (../../images/bg-0.png) to the address url (/static/images/bg-0.png) on ​​my server, but because I need to find the path when packaging, this path If it is abnormal, it cannot be packed immediately. . . . Please tell me how to set up large pictures.

扔个三星炸死你
扔个三星炸死你

reply all(1)
某草草

If the image resources and code are separated and it is not possible, use the full URL path

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!