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

appDir config option creates both _app and custom dir #861

Closed
frederikhors opened this issue Apr 3, 2021 · 7 comments
Closed

appDir config option creates both _app and custom dir #861

frederikhors opened this issue Apr 3, 2021 · 7 comments

Comments

@frederikhors
Copy link
Contributor

frederikhors commented Apr 3, 2021

Describe the bug
If I change the appDir config to app instead of the default _app (Golang doesn't serve directories starting with _) the build dir contains both app and _app!

Before you ask: I deleted the build dir before build.

Expected behavior
To only have my app dir.

Information about your SvelteKit Installation:

Diagnostics

System:
OS: Windows 10 10.0.19042
Binaries:
Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
npm: 7.8.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@sveltejs/kit: 1.0.0-next.70 => 1.0.0-next.70
svelte: 3.37.0 => 3.37.0
vite: 2.1.5 => 2.1.5

  • Your adapter: static 1.0.0-next.4
@lval
Copy link

lval commented Apr 7, 2021

I also had this problem. I solved this by removing everything inside the build and .svelte directories.

@kayakyakr
Copy link

Thanks @lval I was starting to struggle with this one too

@ecstrema
Copy link
Contributor

ecstrema commented Aug 9, 2021

Deleting the svelte directory worked for me too.
Should svelte kit detect changes in the basepath and remove the old directory? This is the kind of thing that can go unnoticed for a while.

@ignatiusmb
Copy link
Member

This can be configured and are now documented by #2135

@ecstrema
Copy link
Contributor

My PR #2135 doesn't change anything about this issue. I believe it should be reopened.

This can be configured and are now documented by #2135

Unless there's something I don't get, it was already configurable, but that's exactly the point of this issue.

@ignatiusmb
Copy link
Member

Yes it doesn't, but your PR now documents the problem and what users are supposed to do, which is what this issue was about, isn't it?

There's also #2260 that would clear out the build directory for adapter-static before building, which I guess would also solve this issue, seeing how it works from the comments above by removing the build directory.

@ecstrema
Copy link
Contributor

Most people that renamed their appDir folder will not read the docs from my PR, since they are specifically for GitHub Pages.

#2260 would indeed probably fix it, but ideally, a complete rebuild should not be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants