Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd86026

Browse filesBrowse files
Change AureliaSpa to use external source maps for compatibility with VS/VSCode debugging
1 parent 996216c commit bd86026
Copy full SHA for bd86026

File tree

Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-3
lines changed
Open diff view settings
Collapse file

‎templates/AureliaSpa/webpack.config.js‎

Copy file name to clipboardExpand all lines: templates/AureliaSpa/webpack.config.js
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ var path = require('path');
33
var webpack = require('webpack');
44
var AureliaWebpackPlugin = require('aurelia-webpack-plugin');
55

6+
var bundleOutputDir = './wwwroot/dist';
67
module.exports = {
78
resolve: { extensions: [ '.js', '.ts' ] },
8-
devtool: isDevBuild ? 'inline-source-map' : null,
99
entry: { 'app': 'aurelia-bootstrapper-webpack' }, // Note: The aurelia-webpack-plugin will add your app's modules to this bundle automatically
1010
output: {
11-
path: path.resolve('./wwwroot/dist'),
11+
path: path.resolve(bundleOutputDir),
1212
publicPath: '/dist',
1313
filename: '[name].js'
1414
},
@@ -30,7 +30,13 @@ module.exports = {
3030
src: path.resolve('./ClientApp'),
3131
baseUrl: '/'
3232
})
33-
].concat(isDevBuild ? [] : [
33+
].concat(isDevBuild ? [
34+
// Plugins that apply in development builds only
35+
new webpack.SourceMapDevToolPlugin({
36+
filename: '[file].map', // Remove this line if you prefer inline source maps
37+
moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
38+
})
39+
] : [
3440
// Plugins that apply in production builds only
3541
new webpack.optimize.UglifyJsPlugin()
3642
])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.