Webpack recently doing a small project file packing case
Met questions are as follows:
. 1, the HTML img src introduction of the [ 'object, module'] in the case
2, for introducing an error css package file resource issues into the correct path, but image placement error address
For the first Question 1 is as follows:
picture pack address is correct situation
occurs because this problem is because file-loader version is too high, the highest version 5.1 I am currently developing, so I will be reduced to version 4.1.0 file-loader after the problem is solved.
For Question 2 this case I also find a lot of solutions.
First, find the problem is that when the CSS and html packaging when packing is to go url-loader were packaged and limit the amount of which will be less than the set limit value packed into CSS directory, which is greater than the value set will be packaged into under the path, I have here is in accordance with the original path output.
So this is the reason a situation that caused the error, but because we can not consider the introduction of picture images of different sizes and introduction (the introduction of the use of CSS or html introduced), it is unlikely to set the limit line.
So they continue to find the real source of the problem lies in the path after picture package misplaced
so the final solution to resolve css or scss path is set, as shown below
So the problem is resolved.
I hope you encounter problems when packaged able to think about their problems and ideas to find the problem, but also you can see more detailed official end of the document.