1.新建文件
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1 id='title'>hello html</h1>
</body>
</html>
index.js
function add(x, y) {
return x + y;
}
console.log(add(3, 2));
webpack.config.js
/*
* @Author: zyl
* @Date: 2021-06-23 10:42:06
* @LastEditors: zyl
* @LastEditTime: 2021-06-23 10:51:09
* loader 1.下载 2.使用