From a427d5f0f0cccaf48e9d0986a5d0a647cc56cb49 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Fri, 21 Oct 2016 13:53:34 +0100 Subject: [PATCH] Fix source map generation in projects that also use ExtractTextPlugin --- templates/Angular2Spa/webpack.config.js | 2 +- templates/KnockoutSpa/webpack.config.js | 2 +- templates/ReactReduxSpa/webpack.config.js | 2 +- templates/ReactSpa/webpack.config.js | 2 +- templates/WebApplicationBasic/webpack.config.dev.js | 2 +- templates/package-builder/src/yeoman/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/Angular2Spa/webpack.config.js b/templates/Angular2Spa/webpack.config.js index b4285a3..34c51a2 100644 --- a/templates/Angular2Spa/webpack.config.js +++ b/templates/Angular2Spa/webpack.config.js @@ -35,7 +35,7 @@ var clientBundleConfig = merge(sharedConfig, { ].concat(isDevBuild ? [ // Plugins that apply in development builds only new webpack.SourceMapDevToolPlugin({ - filename: '[name].js.map', // Remove this line if you prefer inline source maps + filename: '[file].map', // Remove this line if you prefer inline source maps moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk }) ] : [ diff --git a/templates/KnockoutSpa/webpack.config.js b/templates/KnockoutSpa/webpack.config.js index 16f5998..98fd96d 100644 --- a/templates/KnockoutSpa/webpack.config.js +++ b/templates/KnockoutSpa/webpack.config.js @@ -28,7 +28,7 @@ module.exports = { ].concat(isDevBuild ? [ // Plugins that apply in development builds only new webpack.SourceMapDevToolPlugin({ - filename: '[name].js.map', // Remove this line if you prefer inline source maps + filename: '[file].map', // Remove this line if you prefer inline source maps moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk }) ] : [ diff --git a/templates/ReactReduxSpa/webpack.config.js b/templates/ReactReduxSpa/webpack.config.js index 748f568..9398d50 100644 --- a/templates/ReactReduxSpa/webpack.config.js +++ b/templates/ReactReduxSpa/webpack.config.js @@ -41,7 +41,7 @@ var clientBundleConfig = merge(sharedConfig(), { ].concat(isDevBuild ? [ // Plugins that apply in development builds only new webpack.SourceMapDevToolPlugin({ - filename: '[name].js.map', // Remove this line if you prefer inline source maps + filename: '[file].map', // Remove this line if you prefer inline source maps moduleFilenameTemplate: path.relative(clientBundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk }) ] : [ diff --git a/templates/ReactSpa/webpack.config.js b/templates/ReactSpa/webpack.config.js index 6bd8e3d..54d8172 100644 --- a/templates/ReactSpa/webpack.config.js +++ b/templates/ReactSpa/webpack.config.js @@ -29,7 +29,7 @@ module.exports = { ].concat(isDevBuild ? [ // Plugins that apply in development builds only new webpack.SourceMapDevToolPlugin({ - filename: '[name].js.map', // Remove this line if you prefer inline source maps + filename: '[file].map', // Remove this line if you prefer inline source maps moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk }) ] : [ diff --git a/templates/WebApplicationBasic/webpack.config.dev.js b/templates/WebApplicationBasic/webpack.config.dev.js index 8c7d9e1..e3c8f90 100644 --- a/templates/WebApplicationBasic/webpack.config.dev.js +++ b/templates/WebApplicationBasic/webpack.config.dev.js @@ -4,7 +4,7 @@ module.exports = { plugins: [ // Plugins that apply in development builds only new webpack.SourceMapDevToolPlugin({ - filename: '[name].js.map', // Remove this line if you prefer inline source maps + filename: '[file].map', // Remove this line if you prefer inline source maps moduleFilenameTemplate: path.relative('./wwwroot/dist', '[resourcePath]') // Point sourcemap entries to the original file locations on disk }) ] diff --git a/templates/package-builder/src/yeoman/package.json b/templates/package-builder/src/yeoman/package.json index 533a803..a6ca6f5 100644 --- a/templates/package-builder/src/yeoman/package.json +++ b/templates/package-builder/src/yeoman/package.json @@ -1,6 +1,6 @@ { "name": "generator-aspnetcore-spa", - "version": "0.3.8", + "version": "0.3.9", "description": "Single-Page App templates for ASP.NET Core", "author": "Microsoft", "license": "Apache-2.0",