winney

It is never too old to learn.

0%
winney

webpack笔记

将多个js文件合并成一个js文件的同时,不进行压缩

1
2
3
4
5
6
7
8
9
10
11
12
const path = require("path");

module.exports = {
entry: "./src/wanka/index.js", // 入口文件
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js", // 输出的文件名
},
mode: 'development',
devtool: 'source-map' // 设置为生成source map
};