Skip to content
Discussion options

You must be logged in to vote

You're correct in that your component library's layer is ordered first because it's imported first. Layers are created as a side-effect of calling the layer function, which also means you don't need to define globalLayer(layerLibrary); it's redundant.

To fix your problem, you'll need to ensure your layers are imported in the correct order. Generally, when dealing import-order-sensitive CSS, such as reset styles and/or layers, I tend to try and organize the imports in the app entrypoint, e.g. App.tsx.

For this specific example, I also think it could be worth creating a separate entrypoint in your library that just exports the layer. For example:

// component-library/layer entrypoint
import { 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@MatthijsBon
Comment options

Answer selected by MatthijsBon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants