question: use html-webpack-plugin to inject js files into template files. If a.js needs to introduce b.js in head, how should html-webpack-plugin be configured if it needs to be introduced in body? A.js is a global script file.
question: use html-webpack-plugin to inject js files into template files. If a.js needs to introduce b.js in head, how should html-webpack-plugin be configured if it needs to be introduced in body? A.js is a global script file.
there seems to be no such api.
but don't know what your requirements are, be sure to place script tags separately.
because the tags placed in the head block the loading of the page and slow down the rendering speed, the css is usually placed at the head and the js at the bottom
.A single page itself has less html, so it doesn't matter if you put it at the bottom of the head.
Previous: Axios cross-domain problem
problem: because you want to introduce pictures directly into the html file through the img tag, html-withimg-loader is configured in webpack. But in this way, a similar in the html file cannot be parsed! ...
install webpack globally as an administrator, and confirm that it is successful (see figure) "webpack " webpack tried many ways (install webpack again in the project, set environment variables) did not solve ...