Single-page application, do you use webpack to package js files referenced by script tags?

single-page application, angular library files referenced by script tags and controller.js and model.js, of each module can be packaged using webpack, non-professional front end.

Thank you.

Mar.23,2021

No. Webpack is used for modular programming, and it is packaged according to dependencies.


webpack allows you to have a modular development experience, generally speaking, there is no need for you to manually introduce script files into the script element (the introduction of script files is actually more similar to the result of packaging, of course, all the code will be processed to a certain extent during the packaging process), but if you must introduce a script for global use, it is not impossible to write it in the based html.

new HtmlWebpackPlugin({template: './src/index.html'})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37858-4ed05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37858-4ed05.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?