1 核心概念:entry
entry
用来指定 webpack
的打包入口
//单入口:entry是一个字符串
module.exports = {
enter: './src/index.js'
}
//多入口:entry是一个对象
module.exports = {
enter: {
index: './src/index.js',
search: './src/search.js'
}
}
2 核心概念:output
output
用来告诉webpack
如何将编译后的文件输出到磁盘
//单入口,指定 filename 和 path 即可
module.exports = {
entry: './src/index.js',
output: {
path