当前位置: 代码迷 >> 综合 >> [webpack] Configuration Error: Avoid modifying webpack output.publicPath directly.
  详细解决方案

[webpack] Configuration Error: Avoid modifying webpack output.publicPath directly.

热度:1   发布时间:2023-12-12 01:10:22.0

goal

vue-cli脚手架生成的项目,想要配置webpack下的output.publicPath选项

配置1

module.exports = {
    configureWebpack: {
    publicPath: 'http://localhost:8080/',}
}

报错

configuration has an unknown property ‘publicPath’. These properties are valid: output?

理解:需要在output下配置

配置2

module.exports = 
  相关解决方案