From 6befd88753809c6d30d8214e2084456adda11306 Mon Sep 17 00:00:00 2001 From: Michael Attard Date: Fri, 28 Apr 2017 17:37:54 +0200 Subject: [PATCH 1/2] fix(webpack): fix issue where bundles output to build dir sub directory are not emitted --- src/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack.ts b/src/webpack.ts index 8465edfe..44476e26 100644 --- a/src/webpack.ts +++ b/src/webpack.ts @@ -113,7 +113,7 @@ function webpackBuildComplete(stats: any, context: BuildContext, webpackConfig: export function writeBundleFilesToDisk(context: BuildContext) { const bundledFilesToWrite = context.fileCache.getAll().filter(file => { - return dirname(file.path) === context.buildDir && (file.path.endsWith('.js') || file.path.endsWith('.js.map')); + return dirname(file.path).indexOf(context.buildDir) > -1 && (file.path.endsWith('.js') || file.path.endsWith('.js.map')); }); context.bundledFilePaths = bundledFilesToWrite.map(bundledFile => bundledFile.path); const promises = bundledFilesToWrite.map(bundledFileToWrite => writeFileAsync(bundledFileToWrite.path, bundledFileToWrite.content)); From 753990607186f35f9482f2334bbc47eafe07c5e2 Mon Sep 17 00:00:00 2001 From: Dan Bucholtz Date: Fri, 28 Apr 2017 14:17:02 -0500 Subject: [PATCH 2/2] Update webpack.ts --- src/webpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack.ts b/src/webpack.ts index 44476e26..5a16db09 100644 --- a/src/webpack.ts +++ b/src/webpack.ts @@ -113,7 +113,7 @@ function webpackBuildComplete(stats: any, context: BuildContext, webpackConfig: export function writeBundleFilesToDisk(context: BuildContext) { const bundledFilesToWrite = context.fileCache.getAll().filter(file => { - return dirname(file.path).indexOf(context.buildDir) > -1 && (file.path.endsWith('.js') || file.path.endsWith('.js.map')); + return dirname(file.path).indexOf(context.buildDir) >= 0 && (file.path.endsWith('.js') || file.path.endsWith('.js.map')); }); context.bundledFilePaths = bundledFilesToWrite.map(bundledFile => bundledFile.path); const promises = bundledFilesToWrite.map(bundledFileToWrite => writeFileAsync(bundledFileToWrite.path, bundledFileToWrite.content));