From 2d0cb948437f550b36c11033da32834d7c8998bc Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 5 Aug 2017 08:16:31 -0400 Subject: [PATCH] reversing pathinfo logic This creates extra comments in the final .js files, to help debugging. This was a mistake when originally added - the logic was reversed. --- lib/config-generator.js | 2 +- test/functional.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config-generator.js b/lib/config-generator.js index 11e8ab2f..bf672545 100644 --- a/lib/config-generator.js +++ b/lib/config-generator.js @@ -107,7 +107,7 @@ class ConfigGenerator { // will use the CDN path (if one is available) so that split // chunks load internally through the CDN. publicPath: this.webpackConfig.getRealPublicPath(), - pathinfo: this.webpackConfig.isProduction() + pathinfo: !this.webpackConfig.isProduction() }; } diff --git a/test/functional.js b/test/functional.js index 1fa162f2..3f66eca8 100644 --- a/test/functional.js +++ b/test/functional.js @@ -505,6 +505,11 @@ describe('Functional tests using webpack', function() { 'main.js', '// comments in no_require.js' ); + // check for any webpack-added comments + webpackAssert.assertOutputFileDoesNotContain( + 'main.js', + '/*!' + ); // extra spaces should not live in the CSS file webpackAssert.assertOutputFileDoesNotContain( 'styles.css',