diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6cf7f929b..16d22c72f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,6 +9,7 @@ Changelog * Look through the target link and target page slug (in addition to the old slug) when searching for redirects in the admin (Michael Harrison) * Remove support for IE6 to IE9 from project template (Samir Shah) * Remove outdated X-UA-Compatible meta from admin template (Thibaud Colas) + * Add JavaScript source maps in production build for packaged Wagtail (Thibaud Colas) * Fix: Status button on 'edit page' now links to the correct URL when live and draft slug differ (LB (Ben Johnston)) * Fix: Image title text in the gallery and in the chooser now wraps for long filenames (LB (Ben Johnston), Luiz Boaretto) * Fix: Move image editor action buttons to the bottom of the form on mobile (Julian Gallo) diff --git a/client/webpack/base.config.js b/client/webpack/base.config.js index 14c41cda1..32ee96a24 100644 --- a/client/webpack/base.config.js +++ b/client/webpack/base.config.js @@ -67,6 +67,10 @@ module.exports = function exports() { }; })) }, + + // See https://webpack.js.org/configuration/devtool/. + devtool: 'source-map', + stats: { // Add chunk information (setting this to `false` allows for a less verbose output) chunks: false, diff --git a/client/webpack/dev.config.js b/client/webpack/dev.config.js index e10df4d1f..6b4460138 100644 --- a/client/webpack/dev.config.js +++ b/client/webpack/dev.config.js @@ -13,9 +13,6 @@ config.watchOptions = { aggregateTimeout: 300, }; -// See http://webpack.github.io/docs/configuration.html#devtool -config.devtool = 'inline-source-map'; - // Set process.env.NODE_ENV to development to enable JS development aids. config.plugins.push(new webpack.DefinePlugin({ 'process.env': { diff --git a/client/webpack/prod.config.js b/client/webpack/prod.config.js index ec164462a..fcb2e704b 100644 --- a/client/webpack/prod.config.js +++ b/client/webpack/prod.config.js @@ -12,6 +12,8 @@ config.plugins.push(new webpack.DefinePlugin({ // See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js. config.plugins.push(new webpack.optimize.UglifyJsPlugin({ + sourceMap: true, + compress: { screw_ie8: true, warnings: false diff --git a/docs/releases/2.1.rst b/docs/releases/2.1.rst index dd85a321a..02ae346bc 100644 --- a/docs/releases/2.1.rst +++ b/docs/releases/2.1.rst @@ -19,6 +19,7 @@ Other features * Look through the target link and target page slug (in addition to the old slug) when searching for redirects in the admin (Michael Harrison) * Remove support for IE6 to IE9 from project template (Samir Shah) * Remove outdated X-UA-Compatible meta from admin template (Thibaud Colas) +* Add JavaScript source maps in production build for packaged Wagtail (Thibaud Colas) Bug fixes ~~~~~~~~~