-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Updated for Zeit Now V2 #4232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated for Zeit Now V2 #4232
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ivan, thank you for working on this PR! It works great and it has only one issue: if the router is set to history
mode, a deep link will give you 404 error on page refresh. Would be great if you could add a workaround to this guide 😉
Thank you Natalia for the hint! Sadly I couldn't find any better way than this one and I'm not quiet sure if that's something that should be added directly to the docs/guide? As it might make it very long. What do you think? {
"name": "my-example-app",
"version": 2,
"builds": [
{
"src": "dist/**",
"use": "@now/static"
}
],
"routes": [
{
"src": "/(js|css|img)/(.*)",
"dest": "/dist/$1/$2"
},
{
"src": "/favicon.ico",
"dest": "/dist/favicon.ico"
},
{
"src": "/(.*)",
"dest": "/dist"
}
],
"alias": "vue-example"
} |
@ivansieder I think I've seen the same approach on other PRs for Now 2. It seems to be the only possible way for now (please correct me if I am wrong) |
@NataliaTepluhina I've added it now as an additional config, but that way it's clearer what can be left out, if the router mode is not set to history mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor text formatting fixes
Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>
Thank you Natalia, I didn't even see that error 🙊 |
Hey @ivansieder, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚 |
* Updated for Zeit Now V2 * Fixed styling issue * Added additional hint for router mode set to history * Update docs/guide/deployment.md Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com> (cherry picked from commit 55dc287)
No description provided.