I've used Vue Router; I was trying to use a domain name in the path, and I've got a problem.
When I use dot (.) for example http://mywebsite.com/domains/xyz.com in the path, Vue could not find the path and did not go to the component.
I've checked twice. The problem was for middleware of the webpack. The routing is fine and it depends on your web server.
@saman How did you solve this? I have the same issue (dot in URL path). When I click on a \
Edit: I’m running in dev mode (npm run dev).
@ChristianSiegert I wrote a rewrite in dev-server.js
// handle fallback for HTML5 history API
// app.use(require('connect-history-api-fallback')())
var historyApiFallback = require('connect-history-api-fallback')({
// disableDotRule: true,
// verbose: true,
rewrites: [
{
from: /^\/cdn\/.*$/,
to: '/'
}
]
})
folder is an initial path for my app.
Most helpful comment
@ChristianSiegert I wrote a rewrite in
dev-server.jsfolderis an initial path for my app.