Skip to content

Correctly enable sideEffects for css files #74

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

Closed
wants to merge 1 commit into from
Closed

Correctly enable sideEffects for css files #74

wants to merge 1 commit into from

Conversation

danez
Copy link

@danez danez commented May 17, 2018

react-live sets currently sideEffects: false in package.json which is correct for all the js files, but not for the css file(s). css obviously always has sideEffects and for now there is no better solution than specifying this in every package. (see ref)

Ref: webpack-contrib/mini-css-extract-plugin#102

Copy link
Contributor

@kitten kitten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn’t know about this more specific syntax cc @ryan-roemer

@danez
Copy link
Author

danez commented Feb 24, 2019

Any news on this? :)

@kitten
Copy link
Contributor

kitten commented Feb 24, 2019

Hiya, sorry I've been leaving this around for a while without a reply. We are indeed allowed to set sideEffects to true as I suspected as we're using it as intended.

Yes, you can regard this injection as a side effect, but in this context what is meant are side effects during evaluation which would stop bundles from tree shaking correctly.

Thanks for the PR but I'll close it since it doesn't seem to be a change we need to make :)

@kitten kitten closed this Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants