Skip to content

Help if you have time: tree-shake out some ember-component-css styles files #340

@Leooo

Description

@Leooo

Hi there, not an ember-component-css issue I think, but still a question related to using this addon together with other ones.

I'm in the process of creating an addon with several slots-picker components, where the consuming apps can pick up only those they want to use using tree-shaking based on broccoli-funnel etc.

I didn't manage to do the tree-shaking in my addon run before ember-component-css's _allPodStyles is set. So when I use @import "pod-styles" in it fails as it's looking for files that I have excluded from my tree-shaking. Instead I found a dirty hack where I do an @import (optional) of each of my component's stylesheets in addon.less instead of @import "pod-styles", but it's not ideal.

Any idea of a better way of doing that? Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions