报错该如何解决?
估计是你的版本比较高,需要修改一下filename,
filename: '[name].bundle.js'
更详细的你可以查看一下中文官网 https://www.webpackjs.com/configuration/output/#output-filename
module.exports = { entry: { swiper:'./src/swiper.min.js', app:'./src/index.js' }, output: { filename: './js/[name]-[chunkhash].bundle.js', path: path.resolve(__dirname, 'dist') }}