I know there is a GRUNT-BOWER plugin which automatically includes the BOWER dependencies into index.html file through tags every time you install any new bower package.
Is there any similar tool which automatically Injects / includes the NPM dependencies into index.html ?
FYI the project is a VUE-CLI WEBPACK project. Can this be achieved through WEBPACK or do i need a dedicated build tool for doing it ?
If you're using already using webpack you can have a look at html-webpack-plugin . It will create a .html
file with your bundles added as script tags.
html-webpack-plugin in conjunction with creating a vendor bundle should help with this problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.