Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Enable source maps in webpack chunking + bundling process #3793
Its impossible to get good source maps at this moment in next.js
This is sad of course!
This PR aims to fix this by removing the home written source concat and using CommonChunksPlugin to combine main, manifest (added to last defined common chunk, this is the bootstrap code of webpack), react and the commons stuff.
In order to use source-maps one needs to alter the webpack config through next.config and enable it with the following
First set webpack's devtool to 'source-map' in order to get external maps.
And then we're using Uglify and there we need to find the plugin and override the default sourceMap: false from "user-land" config.
All right @arunoda I've fixed what you mentioned and also cleaned up the fix around late bundling regarding the build-stats
does it make sense to update the two failing tests or not since its not manual code in anyway anymore?
@nilportugues we always thoroughly verify all PRs changing default behaviour. So sometimes it takes a while.
@juanramon it doesn't make sense to send
Mar 6, 2018
referenced this pull request
Mar 6, 2018
Any chance this would have messed with
@bryandowning most likely you're locked to an older version of next-css. Try removing the lockfiles, removing node_modules and reinstalling and upgrading next-sass. I'll do a new release soon that locks all versions of next-plugins, then this won't be happening again, because it'll just lock to the version specified.