GithubHelp home page GithubHelp logo

Comments (5)

joeldenning avatar joeldenning commented on May 27, 2024 1

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

from single-spa.

ibacher avatar ibacher commented on May 27, 2024

I agree that the amount of configuration exposed via create-single-spa may be overwhelming to beginners and there's some low-hanging fruit that can be done there. I'd want to know a little bit more about the scope of the proposed "Advanced Customization"; I'm not really familiar with NestJS, but this seems like the area where the tooling is most likely to get a bit out of hand.

from single-spa.

MilanKovacic avatar MilanKovacic commented on May 27, 2024

By default, the development script could be something like:

"start:dev": "single-spa build" (which would use a default single-spa managed webpack configuration)

For projects requiring changes to webpack configuration, they could do something like:

"start:dev": "single-spa build --webpack-configuration custom-webpack-configuration.js"

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
https://nextjs.org/docs/pages/api-reference/next-cli
https://docs.astro.build/en/reference/cli-reference/

from single-spa.

joeldenning avatar joeldenning commented on May 27, 2024

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 single-spa command that encompasses more than just the npm init single-spa that is currently supported via create-single-spa, but would want to discuss exactly which commands are supported and the implications for existing and new users.

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.

from single-spa.

alex-enchi avatar alex-enchi commented on May 27, 2024

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

from single-spa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.