Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Sapper makes assumptions about where to find the 'app' folder. #181

Closed
naturalethic opened this issue Mar 9, 2018 · 2 comments
Closed

Comments

@naturalethic
Copy link
Contributor

For example here:

https://github.com/sveltejs/sapper/blob/master/src/middleware/index.ts#L117

Sapper is assuming the current working directory is similar to development, however in some situations the cwd may be different. For example in my deployment to google cloud functions, I have a deeper directory structure, placing my sapper app in a deep folder from the path where the function is run.

Something like a SAPPER_APP_DIR, SAPPER_BASE_DIR or something similar should be configured to allow for running the app without relying on cwd.

I experimented with using SAPPER_DEST, and assuming that app would be one level above this, however that is not the case for export and breaks that test.

@Rich-Harris
Copy link
Member

As of 0.94 you can configure SAPPER_BASE, SAPPER_APP and SAPPER_ROUTES — hopefully that meets your needs, let me know if not

@naturalethic
Copy link
Contributor Author

Perfect, thanks so much!

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

No branches or pull requests

2 participants