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

bug: Duplicate copy of _app on build #22

Closed
jthegedus opened this issue Mar 16, 2021 · 6 comments
Closed

bug: Duplicate copy of _app on build #22

jthegedus opened this issue Mar 16, 2021 · 6 comments
Labels
bug Something isn't working external dependency Relies on an external/upstream tool

Comments

@jthegedus
Copy link
Owner

Describe the bug

A second copy of the _app dir is created under .svelte/output/client/ and then copied on build to the adapter output.

To Reproduce

Reproduction repo here - https://github.com/jthegedus/sveltekit-firebase-adapter-bug

Expected behavior

It does not create duplicate _app dirs.

@jthegedus jthegedus added the bug Something isn't working label Mar 16, 2021
@jthegedus
Copy link
Owner Author

This could be related - sveltejs/kit#587 🤔

@jthegedus jthegedus changed the title Duplicate copy of _app on build bug: Duplicate copy of _app on build Mar 22, 2021
@jthegedus
Copy link
Owner Author

jthegedus commented May 3, 2021

Could be related - sveltejs/kit#861

@jthegedus
Copy link
Owner Author

jthegedus commented May 3, 2021

It is sveltejs/kit#587

The adapter reads the user's firebase.json configuration file to identify which dir contains static assets to push to the Firebase CDN, in Firebase this defaults to public and is almost never changed by the user. This results in the following process:

  • svelte-kit build outputs .svelte/output/client/_app/*
  • Firebase adapter then executes copy_static_files and copy_client_files which copies the static and .svelte/output/client/_app/* dir contents to public
  • on subsequent svelte-kit build executions Vite then copies public contents into .svelte/output/client/_app/*, then outputs the new build as well, resulting in .svelte/output/client/_app/* and .svelte/output/client/_app/_app/*. This then gets copied by the adapter copy_static_files and copy_client_files into public.
  • each re-run of svelte-kit build produces a further nested _app dir in .svelte/output/client/ resulting in increasingly large uploads to the CDN

@jthegedus
Copy link
Owner Author

#39 included some documentation to notify users. A final soln in sveltejs/kit#587 would be ideal

@jthegedus jthegedus added the external dependency Relies on an external/upstream tool label May 16, 2021
@Nushio
Copy link
Collaborator

Nushio commented May 14, 2022

As of the latest sveltekit / sveltekit adapter firebase, we're no longer using a duplicate copy of _app.
I'll go ahead and close this issue.

@Nushio Nushio closed this as completed May 14, 2022
@jthegedus
Copy link
Owner Author

Resolved in sveltejs/kit#4214

There is some code which should be removed to accompany this change. I will look to cover this in a rewrite soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external dependency Relies on an external/upstream tool
Projects
None yet
Development

No branches or pull requests

2 participants