vue-cli 3.0 provides a pages config to configure multi page mode.
https://cli.vuejs.org/config/#pages
I'm currently trying to get the dev server working with HTML5 history mode, but with no luck so far.
Has anyone already tried this feature and got a working example?
You need to add configuration of devserver to vue.config.js.
By specifying rewrite for historyApiFallback, that problem is solved.
e.g. Implement multiple pages as index page and signin page
vue.config.js:
In order to apply the above setting you need to run
vue inspect
, please be careful.Also, be careful when baseUrl is specified. The following is stated in the document.
So, in such a case, set a base tag to the template.
<base href="/appname/">
Since this is the configuration of the environment for development, please specify the redirect in the setting of hosting in the production environment.