S
S
sertu2021-12-04 13:50:06
webpack
sertu, 2021-12-04 13:50:06

How to set up webpack5?

Good afternoon, after a recent npm update, when building webpack5, the path to url background images began to display incorrectly

background:#171f2c url(webpack:///images/images.jpg)

loader
// IMAGES

                {
                    test: /\.(png|jpg|gif|webp)$/,
                    type: "asset",
                    generator: {
                        filename: '../images/[name][ext]'
                    }

                },

Tell me, thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question