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

Enable sourcemaps in rollup config by default #13

Merged

Conversation

raycohen
Copy link
Contributor

As a followup, source-map-explorer could be added as suggested in
https://github.com/facebook/create-react-app/tree/next/packages/react-scripts/template#analyzing-the-bundle-size

Here's the PR that would allow CRA to support using the sourcemaps this PR generates: facebook/create-react-app#2355

It was closed as stale due to lack of interest. Perhaps we can drum up some interest!

README.md Outdated
@@ -111,6 +112,21 @@ Here is a [branch](https://github.com/transitive-bullshit/react-modern-library-b

Here is a [branch](https://github.com/transitive-bullshit/react-modern-library-boilerplate/tree/feature/material-ui) which demonstrates how to create a module that makes use of a relatively complicated peer dependency, [material-ui](https://github.com/mui-org/material-ui). It shows the power of [rollup-plugin-peer-deps-external](https://www.npmjs.com/package/rollup-plugin-peer-deps-external) which makes it a breeze to create reusable modules that include complicated material-ui subcomponents without having them bundled as a part of your module.

## Sourcemaps

Choose a reason for hiding this comment

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

I'm fine with adding sourcemap generation by default, but I'd rather not add a whole section to the readme devoted to them. imho, the walkthrough instructions are already verbose enough.

Copy link
Owner

@transitive-bullshit transitive-bullshit left a comment

Choose a reason for hiding this comment

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

This change looks great -- I hadn't even thought about enabling sourcemaps!

Just one minor request to keep the readme tight & focused, as it's already pretty verbose.

@raycohen
Copy link
Contributor Author

I've removed the README changes. I think my only concern is warning people that CRA currently won't pick the sourcemaps up.

@transitive-bullshit transitive-bullshit merged commit 13899ba into transitive-bullshit:master Feb 27, 2018
@transitive-bullshit
Copy link
Owner

Agreed; maybe as a compromise we can add a smaller note in the README with a link to an issue that explains the sourcemap status in-depth?

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