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

Production mode with sourcemaps (Debug Build) #7

Open
3 tasks
Shard opened this issue Feb 26, 2019 · 3 comments
Open
3 tasks

Production mode with sourcemaps (Debug Build) #7

Shard opened this issue Feb 26, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@Shard
Copy link
Contributor

Shard commented Feb 26, 2019

Need to have a clean way to build apps for production with sourcemaps and without instead of having to edit webpack config with some of the overrides. What I propose is spliting the builds into production and debug.

production works as currently, proper optimized build and debug would build with the production ENV variable on and everything else that should be on so there is no dev mode mocking but still include source maps and potentially things like redux dev tools.

  • New webpack config
  • Build to separate folders in dist
  • add new package.json script build:debug
@elsimir
Copy link
Contributor

elsimir commented Feb 26, 2019

@Shard I disagree with making build with maps the default. While it can be useful in development the size of the source maps is not inconsequential and we should make sure people don't bloat their app by accident. Debugging with maps on device is not the most common use case especially as we iron out more issues.

@Shard
Copy link
Contributor Author

Shard commented Feb 26, 2019

Thanks @elsimir, Updated to reflect.

@cyrildoussin
Copy link
Contributor

FWIW it's worth I agree with @elsimir Source maps are too large which causes a few problems:

  • downloaded IWAs are too big (in time to download and in time to decompress)
  • app builds are significantly larger when IWAs are built in
  • large bundles generally (and possibly particularly source maps) are a likely cause for issues like the Safari inspector crashing when debugging on device.

Therefore, I don't think it's reasonable to leave them in builds by default.

@cyrildoussin cyrildoussin added the enhancement New feature or request label May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants