Skip to content
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

Allow _redirects to be placed in root directory #1586

Merged
merged 2 commits into from
Jun 1, 2021

Commits on May 29, 2021

  1. fix(adapter-netlify): Append to _redirects

    This was easier to fix than expected. The fix should allow users to have their own `_redirects` file in the project root. If this file exists, it gets copied to `build/` before `adapter-netlify` appends the catchall rule to it.
    
    This behaviour is [already documented](https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify#using-netlify-redirect-rules), but [currently broken](sveltejs#1585).
    
    How can I write an automated test for this adapter?
    
    I did the following to test this manually:
    
    1. Use `yarn link "@sveltejs/kit"` and `yarn link "@sveltejs/adapter-netlify"` in my application repository to point the two node modules to my modified versions.
    2. Run `svelte-kit build` with a `_redirects` file in the project root.
    3. Check if content of `build/_redirects` is expected.
    4. Run `svelte-kit build` *without* a `_redirects` file in the project root.
    5. Check if content of `build/_redirects` is expected.
    
    Any guidance or help how to match the desired code quality to get this PR merged is appreciated.
    
    close sveltejs#1585
    roschaefer committed May 29, 2021
    Configuration menu
    Copy the full SHA
    7a4abc7 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2021

  1. Configuration menu
    Copy the full SHA
    6b294d6 View commit details
    Browse the repository at this point in the history