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

Allow StyleSheetServer to be minified out in client-only bundles, and StyleSheetTestUtils to be minified out in production #305

Merged
merged 2 commits into from
Mar 15, 2018

Conversation

lencioni
Copy link
Collaborator

@lencioni lencioni commented Mar 4, 2018

Allow StyleSheetServer to be minified out in client-only bundles

Webpack can be configured to minify out this code when building bundles
that are client-only. This can be accomplished via the DefinePlugin:

new webpack.DefinePlugin({
  "typeof window": JSON.stringify("object")
})

Allow StyleSheetTestUtils to be minified out in production

These should never be used in production, so let's write it in a way
that it can be minified out to further reduce bundle sizes. Not a huge
impact, but might as well squeeze out a few more bytes.

lencioni added 2 commits March 3, 2018 16:43
These should never be used in production, so let's write it in a way
that it can be minified out to further reduce bundle sizes. Not a huge
impact, but might as well squeeze out a few more bytes.
Webpack can be configured to minify out this code when building bundles
that are client-only. This can be accomplished via the DefinePlugin:

```
new webpack.DefinePlugin({
  "typeof window": JSON.stringify("object")
})
```
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.

1 participant