问题解决 webpack.config.js 配置 publicPath 为 / output: { filename: `js/[name]${isDev ? '' : '.[fullhash:8]'}.js`, path: path.resolve(PROJECT_PATH, './dist'), publicPath: '/' }, webpack 开发环境配置 historyApiFallback 为true devServer:{ historyApiFallback:true }