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
One thing that @broccolini and I had to do to get the primer-css module building successfully in the new monorepo structure (see #230) was to manually addall of the submodules to the dependencies in primer-css/package.json. Here's an example of why:
primer-cssimportsprimer-core, which can be resolved by Sass in primer-css/node_modules because it's a dependency.
primer-coreimportsprimer-support, which doesn't exist in primer-css/node_modulesunless primer-css also depends on primer-support.
In other words, generally speaking: Every primer module currently must list all of its dependencies' dependencies (and so on) in order to build successfully with primer-module-build. This is... not ideal. It's not super brittle because we've already listed all of the modules — but the next time that we do add a module, we need to be sure to add it as a dependent of primer-css in addition to any other modules that use it.
We could potentially get around this by changing the way that primer-module-build resolves imports, or look at a tool like Eyeglass that does this already. Whether we decide to fix it or not, it's something to be aware of. 🚧
The text was updated successfully, but these errors were encountered:
FYI, I've tested this and everything builds without issue when all but the meta-packages are removed as dependencies from primer. Maybe something to save for v11 though?
One thing that @broccolini and I had to do to get the
primer-css
module building successfully in the new monorepo structure (see #230) was to manually add all of the submodules to thedependencies
inprimer-css/package.json
. Here's an example of why:primer-css
importsprimer-core
, which can be resolved by Sass inprimer-css/node_modules
because it's a dependency.primer-core
importsprimer-support
, which doesn't exist inprimer-css/node_modules
unlessprimer-css
also depends onprimer-support
.In other words, generally speaking: Every primer module currently must list all of its dependencies' dependencies (and so on) in order to build successfully with
primer-module-build
. This is... not ideal. It's not super brittle because we've already listed all of the modules — but the next time that we do add a module, we need to be sure to add it as a dependent ofprimer-css
in addition to any other modules that use it.We could potentially get around this by changing the way that
primer-module-build
resolves imports, or look at a tool like Eyeglass that does this already. Whether we decide to fix it or not, it's something to be aware of. 🚧The text was updated successfully, but these errors were encountered: