Comments (5)
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.
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.
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.
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.
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)
- Drop IE11 support
- Question: Is it possible to consume via single-spa webpack5 based federated micro frontends and vice versa?
- TypeError in Safari: createElementVNode is not a function HOT 5
- Questions about routing HOT 4
- Is this a solution for Vite ESM? HOT 4
- Rework navigation cancelation
- How to merge large application with single spa HOT 1
- Single-spa is always appending index.html to the URL HOT 4
- react query cache stay untouched after switching application HOT 8
- Adding styleguide to Nuxt app with single-spa
- PROPOSAL: Add the posibility of recycle micro-apps styles, after those are unmounted HOT 1
- Fixed component flickers during trasition between MFEs HOT 1
- Catching Runtime Error so user isn't bothered HOT 3
- Cannot use dts-bundle-generator with single-spa HOT 1
- Parcel use in a migrated react project to single-spa HOT 2
- Issue with updating divs containing single-spa apps via AJAX HOT 3
- Logging SystemJS Error#3 HOT 1
- Single Spa and Angular v 17
- Single Spa + Vue3 vue-router triggers route guard multiple times
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from single-spa.