distilagency / starward

:boom: ReactJS Wordpress Boilerplate
27 stars 9 forks source link

Added better source-mapping #141

Closed falconmick closed 5 years ago

falconmick commented 6 years ago

I am a developer that lives on my debugger. When we swapped over to React 16 it looks like we changed the dev tools to be cheaper for build time but at the cost of the ability to easily debug.

Specifically the devtool for dev browser renderer was changed to one that uses eval, so files are split in the chrome debugger, but they come through compiled :( for that reason I propose changing it to 'eval-source-map' which also uses eval, but can be translated back into a source file so I can be :) (slow initial build, but fastish re-build!) It is also the recommended dev time source map according to the docs: https://webpack.js.org/configuration/devtool/

I've also updated the dev server devtool to source-map as it's the correct spelling (sourcemap works but it's not correct)

I also have removed devtool source maps from production as we are not using a error logging service so we have 0 gain having source maps other than slower build times.

samlogan commented 6 years ago

@falconmick merge this when ready

AllanPooley commented 5 years ago

@falconmick and this one too! Merge away!