出口(output)
output
属性告诉 webpack
在哪里输出它所创建的 bundles
,以及如何命名这些文件,默认值为 ./dist
。基本上,整个应用程序结构,都会被编译到你指定的输出路径的文件夹中。
const path = require('path')
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'my-first-webpack.bundle.js'
}
}
Last updated
Was this helpful?