Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(webpack): fix issue where bundles output to build dir sub directo… (
Browse files Browse the repository at this point in the history
#938)

* fix(webpack): fix issue where bundles output to build dir sub directory are not emitted

* Update webpack.ts
  • Loading branch information
michaelgeorgeattard authored and danbucholtz committed Apr 28, 2017
1 parent 64e2ff1 commit aaa9d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) >= 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));
Expand Down

1 comment on commit aaa9d3c

@iron9light
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!!!

Please sign in to comment.