You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactoring the project structure for monorepo. Make it more manageable.
Motivation
Currently, Element Plus uses monorepo to manage many packages, but there are many problems with it.
Some packages won't publish to the npm registry.
Dependencies
Most dependencies are added in both the root workspace and packages/element-plus workspace. It is very confusing to manage. When installing new dependencies, it's easy to forget to add them to two places.
Confusing dependencies between packages. All packages are installed in the root workspace.
Most scripts are hoisted to the root workspace (up to 39 scripts). It's difficult to manage.
First of all, we need to have two categories, node and web. Node is toolchains running on Node.js runtime, and Web runs on browsers. Then like Vue, we should extract codes that have the same dependencies and publish them to the npm registry. Here is an example:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Refactoring the project structure for monorepo. Make it more manageable.
Motivation
Currently, Element Plus uses monorepo to manage many packages, but there are many problems with it.
packages/element-plus
workspace. It is very confusing to manage. When installing new dependencies, it's easy to forget to add them to two places.Detailed design
Demo repo: https://github.com/sxzz/element-plus-next
First of all, we need to have two categories,
node
andweb
. Node is toolchains running on Node.js runtime, and Web runs on browsers. Then like Vue, we should extract codes that have the same dependencies and publish them to the npm registry. Here is an example:Reference
12 votes ·
Beta Was this translation helpful? Give feedback.
All reactions