Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 232e908

Browse files
Pass through error stack when NPM module loading failed in aspnet-webpack and aspnet-prerendering to make debugging easier
1 parent 5214a55 commit 232e908

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aspnet-prerendering",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function findBootModule<T>(applicationBasePath: string, bootModule: BootModuleIn
128128
try {
129129
aspNetWebpackModule = require('aspnet-webpack');
130130
} catch (ex) {
131-
callback('To load your boot module via webpack (i.e., if you specify a \'webpackConfig\' option), you must install the \'aspnet-webpack\' NPM package.', null);
131+
callback('To load your boot module via webpack (i.e., if you specify a \'webpackConfig\' option), you must install the \'aspnet-webpack\' NPM package. Error encountered while loading \'aspnet-webpack\': ' + ex.stack, null);
132132
return;
133133
}
134134

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aspnet-webpack",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
7373
try {
7474
aspNetWebpackReactModule = require('aspnet-webpack-react');
7575
} catch(ex) {
76-
callback('To use ReactHotModuleReplacement, you must install the NPM package \'aspnet-webpack-react\'.', null);
76+
callback('ReactHotModuleReplacement failed because of an error while loading \'aspnet-webpack-react\'. Error was: ' + ex.stack, null);
7777
return;
7878
}
7979

@@ -93,7 +93,7 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
9393
try {
9494
webpackHotMiddlewareModule = require('webpack-hot-middleware');
9595
} catch (ex) {
96-
callback('To use HotModuleReplacement, you must install the NPM package \'webpack-hot-middleware\'.', null);
96+
callback('HotModuleReplacement failed because of an error while loading \'webpack-hot-middleware\'. Error was: ' + ex.stack, null);
9797
return;
9898
}
9999
app.use(webpackHotMiddlewareModule(compiler));

0 commit comments

Comments
 (0)