-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Preact CLI buy-in #108
Comments
I am 100% in favor of opening up templates to address these issues. The only constraint I place on these efforts is that the defaults need to remain a streamlined and updatable implementation of best practices. That is the main issue i have with scaffolding configuration rather than housing it within the CLI - it makes updates impossible. For some context, we've had an opinionated CLI around Preact where I work for around a year and a half. It's gone through 13 major versions, yet none of our projects have needed to be reinitialized or re-setup as a result - the configuration is housed entirely within the CLI tool, but can be mutated by passing arguments to the CLI, which enables a high degree of backwards compatibility. I think a combination of So your points are all very valid and things I've been pondering as well. There's a balance here, and so far we've been quite far on the side of "just works" and "updatable", and haven't done much to address the other side of "configurable" and "scalable". FWIW I am working on a few projects right now that I intend to convert over to Preact CLI once we've released a version that allows configuration extension. |
Right now, my impression is that without the buy-in you lose the ability to easily make updates. However, I think the buy-in with #56 probably addresses most of the issues that I have with customizability. With the buy-in, I wonder if there would exist a point where projects which were initialized with [happy to close issue, excited for #56] |
I think that's where things like Create React App allow "ejecting", which I'm open to but would represent a bit of work. Perhaps being able to export the current webpack configuration but then losing out on some of the CLI niceties would be okay though. If you're good to close I think we can consolidate under #56. |
IMO, the I'm not necessarily advocating for an |
@lukeed I am not super familiar with CRA. However, it makes sense to me that ejecting should output a |
I just double-checked -- it looks like it's been a long time since I've used CRA. 😅 Their |
Yup. It might not be identical to the built-in config (loaders missing maybe) but it should be the same build output. |
I am curious about the future of preact-cli. I have been experimenting with a couple of projects, each of which I have run into some issues.
One example is supporting
async
/await
and the required tweaks needed to.babelrc
, which I believe #56 will solve. Another example is some tweaks I would like to make to theprerender.js
. But both of these are opinionated changes. These are not changes that I would expect to be included inpreact-cli
.As far as I can tell, to make these changes, I either need to wait for updates to
preact-cli
or forkpreact-cli
for opinionated changes.I think both of these problems could be addressed by moving config / build scripts into the project that
preact-cli
generates (vue-cli
does this). I have been watching #56 (much ❤️ for contributors) however I worry that this will increase the cost of buy-in of working withpreact-cli
.I think the suggestion made here is an interesting option (clone templates from a repo). Here are some thoughts around this:
Anyway, sorry for the opinions. Much ❤️ for the project!
The text was updated successfully, but these errors were encountered: