Answer the question
In order to leave comments, you need to log in
How to disable image checking in styles in webpack?
In the assembly, all the statics are in a separate folder, there are also pictures, as a result, these pictures are moved to the root when assembling the entire folder:
- public
- index.html
- app.js
- images
- fonts
- src
- index.pug
- app.js
- static
- images
- fonts
- ...
<head />
. Answer the question
In order to leave comments, you need to log in
You can specify in the config where to put pictures after processing by webpack, in the name key (publicPath variable depending on the environment in my config)
{
test: /\.(png|jpg|jpeg|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
name: 'assets/images/[name].[ext]',
publicPath
}
}
]
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question