Basically, I'm using Vue cli with webpack template and I need to use history mode in vue router, but i'm using params for a route.
I read this doc: https://router.vuejs.org/en/essentials/history-mode.html and I look this thread too: Problems with vue router (history mode) in development server Vue.js - “Cannot GET /config”
So I change webpack.dev.conf.js from:
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
}
to
historyApiFallback: true
Now I get a blank page when tried to access a page with params. Any clue?
server-side
rendering? Can you post code to reproduce the issue? I recently created a small app using Vue and was able to access pages with params also. – a16262.5.x
or greater version ofVue
– a1626