Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import "side-effect" gets tree-shaken if the module is not ES #1050

Closed
pYr0x opened this issue Jul 24, 2018 · 2 comments
Closed

import "side-effect" gets tree-shaken if the module is not ES #1050

pYr0x opened this issue Jul 24, 2018 · 2 comments
Labels

Comments

@pYr0x
Copy link
Contributor

pYr0x commented Jul 24, 2018

here is a demo app.
https://github.com/pYr0x/css-treeshaken

using steal and steal-tools -> 2

the options treeShaking: false addes the css files as dependencies to the "main" module

@pYr0x pYr0x added the bug label Jul 24, 2018
@matthewp
Copy link
Member

Looks like it's building out, just removed as a dependency. Looking into it.

@matthewp
Copy link
Member

Breaking test: 1c8c192

The problem is not related to CSS, just doesn't work if the dependency is not an ES module.

@matthewp matthewp changed the title CSS gets treeshaken import "side-effect" gets tree-shaken if the module is not ES Jul 24, 2018
matthewp added a commit that referenced this issue Jul 24, 2018
Importing CSS is always side-effectual, and should not be tree-shaken.
Fixes #1050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants