Skip to content

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

Merged
merged 4 commits into from
Jul 14, 2019
Merged

Updated for Zeit Now V2 #4232

merged 4 commits into from
Jul 14, 2019

Conversation

ivansieder
Copy link
Contributor

No description provided.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
SimenB Simen Bekkhus

Verified

This commit was signed with the committer’s verified signature. The key has expired.
SimenB Simen Bekkhus
Copy link
Member

@NataliaTepluhina NataliaTepluhina left a 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 😉

@ivansieder
Copy link
Contributor Author

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"
}

@NataliaTepluhina
Copy link
Member

@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)

@ivansieder
Copy link
Contributor Author

@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.

Copy link
Member

@NataliaTepluhina NataliaTepluhina left a 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>
@ivansieder
Copy link
Contributor Author

Thank you Natalia, I didn't even see that error 🙊

@NataliaTepluhina NataliaTepluhina merged commit 55dc287 into vuejs:docs Jul 14, 2019
@vue-bot
Copy link

vue-bot commented Jul 14, 2019

Hey @ivansieder, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

haoqunjiang pushed a commit that referenced this pull request Jul 18, 2019
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants