mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 11:07:29 +00:00
Switch from inline to external source maps. This avoids several problems with inline source maps in VS 2015 (at least as of Update 3).
This commit is contained in:
@@ -60,6 +60,9 @@
|
||||
"Views",
|
||||
"web.config",
|
||||
"wwwroot"
|
||||
],
|
||||
"exclude": [
|
||||
"wwwroot/dist/*.map"
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ var sharedConfig = () => ({
|
||||
});
|
||||
|
||||
// Configuration for client-side bundle suitable for running in browsers
|
||||
var clientBundleOutputDir = './wwwroot/dist';
|
||||
var clientBundleConfig = merge(sharedConfig(), {
|
||||
entry: { 'main-client': './ClientApp/boot-client.tsx' },
|
||||
module: {
|
||||
@@ -30,7 +31,7 @@ var clientBundleConfig = merge(sharedConfig(), {
|
||||
{ test: /\.(png|jpg|jpeg|gif|svg)$/, loader: 'url', query: { limit: 25000 } }
|
||||
]
|
||||
},
|
||||
output: { path: path.join(__dirname, './wwwroot/dist') },
|
||||
output: { path: path.join(__dirname, clientBundleOutputDir) },
|
||||
plugins: [
|
||||
new ExtractTextPlugin('site.css'),
|
||||
new webpack.DllReferencePlugin({
|
||||
@@ -39,7 +40,10 @@ var clientBundleConfig = merge(sharedConfig(), {
|
||||
})
|
||||
].concat(isDevBuild ? [
|
||||
// Plugins that apply in development builds only
|
||||
new webpack.SourceMapDevToolPlugin({ moduleFilenameTemplate: '../../[resourcePath]' }) // Compiled output is at './wwwroot/dist/', but sources are relative to './'
|
||||
new webpack.SourceMapDevToolPlugin({
|
||||
filename: '[name].js.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
|
||||
})
|
||||
] : [
|
||||
// Plugins that apply in production builds only
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
|
||||
Reference in New Issue
Block a user