Require is not defind

in the process of learning webpack packaging, other js files are introduced with require in main.js, then the service is started with webpack-dev-server , and an error is reported after opening it

.

webpack.config.js is configured as follows:

clipboard.png

package.json:

clipboard.png
:

clipboard.png
main.js:


lodash.js:


index.html:


npm run dev:

clipboard.png


there is no loader
and HtmlWebpackPlugin needs to be associated with your html


? the modular writing of main.js is for node to execute. Do you expect browsers to recognize require


html js should choose output
instead of entry

?
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-1b36573-2bffc.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-1b36573-2bffc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?