unic / estatico

[DEPRECATED] Estático – Static site generator for frontend unicorns
Other
121 stars 18 forks source link

JS Source Maps broken #58

Closed swey closed 6 years ago

swey commented 7 years ago

The current devtool setting of eval-cheap-module-source-map is broken.

This is probably related to the following: https://github.com/webpack/webpack/issues/2145 An overview which settings are working: https://github.com/webpack/webpack/issues/2145#issuecomment-267575289

But of course the current configuration would be the best, because the others have a lot more drawbacks: http://webpack.github.io/docs/configuration.html#devtool

Any opinions whats the best way to work around that bug without losing development performance? Maybe temporarily switching to cheap-eval-source-map and add another env option for using source-map?

swey commented 7 years ago

Update:

Maybe temporarily switching to cheap-eval-source-map and add another env option for using source-map?

That's how we "solved" it for the moment:

devtool: util.env.dev ? (util.env.fullSourceMaps ? 'source-map' : 'eval-cheap-source-map') : null 
backflip commented 6 years ago

@swey, this seems to have been fixed in the meantime as https://www.npmjs.com/package/@unic/estatico-webpack creates proper source maps for me.

Thanks for the workaround anyway!