Skip to content

Commit

Permalink
fix for outFile option; respect file-extension (parcel-bundler#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert R枚脽ger authored and devongovett committed May 3, 2018
1 parent 6cc6218 commit 5267c50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ class Bundle {

// If this is the main entry file, use the output file option as the name if provided.
if (isMainEntry && entryAsset.options.outFile) {
name = entryAsset.options.outFile;
let _ext = Path.extname(entryAsset.options.outFile);
if (_ext && _ext.length > 0) {
ext = _ext;
name = Path.basename(entryAsset.options.outFile, ext)
} else {
name = entryAsset.options.outFile
}
}

// If this is an entry asset, don't hash. Return a relative path
Expand Down

0 comments on commit 5267c50

Please sign in to comment.