From 3c797a7537636a286e5043457c4848f60684369a Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 14 Apr 2022 20:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=94=AF=E6=8C=81history=E6=A8=A1=E5=BC=8F=20(?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAhash=E6=A8=A1=E5=BC=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/router.js | 1 + webpack/webpack.dev.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/router/router.js b/src/router/router.js index efcf2f777..02eb68904 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -3126,6 +3126,7 @@ BI.RouterWidget = BI.inherit(BI.Widget, { init: function () { this.$router = this._router = BI.Router.$router = $router = new VueRouter({ + mode: this.options.mode, routes: this.options.routes }); this.$router.beforeEach(function (to, from, next) { diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js index d3c0fb5bc..9e5a21432 100644 --- a/webpack/webpack.dev.js +++ b/webpack/webpack.dev.js @@ -36,11 +36,17 @@ module.exports = merge(common, { output: { path: dirs.DEST, filename: "[name].js", + publicPath: '/', }, devServer: { contentBase: path.join(__dirname, ".."), port: 9001, liveReload: true, + historyApiFallback: { + rewrites: [ + { from: /.*/, to: '/index.html' }, + ], + }, }, plugins: [ new MiniCssExtractPlugin({