-
-
Notifications
You must be signed in to change notification settings - Fork 916
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
PROPOSAL: single-spa CLI #1205
Comments
I agree that the amount of configuration exposed via |
By default, the development script could be something like:
For projects requiring changes to webpack configuration, they could do something like:
Where we would then inject internal webpack configuration, and allow customers to customize, it similar to: https://docs.nestjs.com/recipes/hot-reload#configuration Some examples: https://docs.nestjs.com/cli/overview |
I'm pretty hesitant about going down the path of Angular / Vite / Next / etc where they hide the bundler config, lint config, test config, etc etc within node_modules. I'm open to a Managing bundler configuration within node_modules is tempting, but I've been in the node_modules bundler configs for single-spa contracting consultants enough to know that we should be cautious about it. Surfacing configuration to single-spa end users is a good thing. I would prefer code mods updating the configuration in many cases, rather than upgrading an npm package that is hiding dozens of configuration files. The Angular way of burying configuration was so horrible to integrate with single-spa - it will be hard to convince me to go down the same path. JS devs in 2024 are past JS fatigue into "can AI do my job for me" and so there are fewer developers willing to go read webpack documentation than in the past. We should seek an improved DX for single-spa users, but I'd prefer not discarding the current userbase's way of doing things and also would prefer letting users manage the raw configuration rather than constantly opening github issues on single-spa CLI to be able to change their jest configs. |
After discussing this further with Milan during the monthly core team meeting, we've decided to proceed with a proposal and proof of concept for it. In 2024, we probably need to simplify the DX to be able to be viable compared to alternatives, even though I don't like hiding configuration |
While I agree that cli would be nice for fresh projects but hiding configuration means much harder time for existing projects to migrate. Is it possible to have a cli tool but keep minimal configuration as visible as possible? I’m quite reluctant to add another cli tool into the toolchain |
Proposal for single-spa CLI Introduction
Summary
This proposal advocates for the introduction of a
single-spa
Command Line Interface (CLI) to streamline the project setup and configuration process within the single-spa ecosystem. Currently,create-single-spa
serves as the primary utility for initializing single-spa projects. The new CLI aims to not only replacecreate-single-spa
but also provide a unified and simplified interface for creating, developing, and building single-spa projects. It seeks to address the challenge of default exposure of not just webpack configuration but also other infrastructure settings such as Babel config to all users, regardless of their need for customization.Problem
The current state of tooling in the single-spa ecosystem presents several challenges:
create-single-spa
utility focusing primarily on project initialization, there is a noticeable absence of a comprehensive tool that encompasses a broader range of development activities. A unified CLI could significantly enhance the developer experience by streamlining project creation, development, and build processes.Solution
The proposed
single-spa
CLI is designed to tackle these issues effectively:create-single-spa
, the new CLI will offer an integrated solution for project management, including creation, development, and build processes. This unified approach aims to simplify the development workflow, making the single-spa ecosystem more approachable and user-friendly.By addressing these challenges, the proposed
single-spa
CLI aims to enhance the overall development experience within the single-spa ecosystem, offering a balance between simplicity for beginners and powerful customization options for experienced developers.The text was updated successfully, but these errors were encountered: