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

RFC for Sapper configuration #23

Closed
wants to merge 1 commit into from

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented May 21, 2020

I'd like to help unblock Sapper development. It was mentioned on Discord that this was a large blocking issue. (Please let me know if there's something else I could be doing that would be more productive or welcomed).

I filed an issue to track it and solicit input and it was suggested than an RFC may be a good option for this type of issue. Sapper doesn't have its own RFC process and many of the committers to the two projects are the same, so I hope you don't mind me sending this here. I've left that issue open for the time being, but please feel free to close it.

Rendered

@antony
Copy link
Member

antony commented Jun 15, 2020

My initial thoughts:

  • The presence of the config file should be completely optional
  • We should have svelte.config.js and sapper.config.js.
  • We should validate the values in the config file using some sort of schema (I'm a fan of Joi, but there are other options)
  • It should be JS
  • There is a library which handles this sort of config, but I don't know a huge amount about it - I guess defer to decisions made in language-tools?
  • I might not include middleware config in there. It seems like something that could be broken in server.js and become a bit mysterious.
  • Having worked with and as a DevOps, I feel like ENV_VARS should trump all, even flags. I don't know what the precedence is on this.

@ajbouh
Copy link

ajbouh commented Jul 3, 2020

I'm eager for this work to move forward as I am finding the current command line option approach to configuration to be stifling.

I agree with not keeping middleware config in this file, since that's actual source code and may be doing any number of custom things that have very little to do with high-level configuration.

I'd also advocate for limiting the first version of the config to just replace command line options. That would unblock a number of configuration PRs and help projects using sapper both move faster and spend their energy on making their applications that much more awesome.

RE: Environment variables, without a very specific motivating reason, I don't think you want a value that's invisible and automatically inherited (like an environment variable) to be able to override something explicit and localized.

Unfortunately the current approach to "waiting to merge" configuration PRs means people are just accumulating forks, using shell script hacks to transform outputted files, and/or abandoning Sapper in favor of alternatives that are easier to configure (but worse to use).

Most of my comments above sound negative, but I'm actually very excited about all of this and am eager to help move it forward!

@TheComputerM

This comment has been minimized.

@pngwn
Copy link
Member

pngwn commented Dec 12, 2020

Closing this as it is no longer relevant. svelte/kit will have a config file and that tooling will be replacement sapper in the future.

@pngwn pngwn closed this Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants