This repository has been archived by the owner on Mar 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from Comandeer/t/146
Fix for banner outputted twice
- Loading branch information
Showing
7 changed files
with
97 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/fixtures/simple-project/rollup.config.bannerInheritTwice.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import minify from '../../../dist/rollup-plugin-babel-minify.es2015.js'; | ||
|
||
export default { | ||
input: 'index.js', | ||
plugins: [ | ||
// Plugin adding banner dynamically is used to ensure that test passes due to fix, | ||
// not due to the fact that plugin does not insert banner on its own, causing that | ||
// banner is inserted only once (by Rollup). | ||
{ | ||
outputOptions( outputOptions ) { | ||
return Object.assign( {}, outputOptions, { | ||
banner: '/* hublabubla */' | ||
} ); | ||
} | ||
}, | ||
|
||
minify() | ||
], | ||
output: { | ||
sourcemap: true, | ||
file: 'bundle.js', | ||
format: 'es' | ||
} | ||
}; |