chore: add BannerPlugin

This commit is contained in:
Roman Hotsiy 2018-03-21 20:08:46 +02:00
parent a0845325d9
commit 18d051a82d
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -16,6 +16,13 @@ const REVISION = JSON.stringify(
.trim(), .trim(),
); );
const BANNER =
`ReDoc - OpenAPI/Swagger-generated API Reference Documentation
-------------------------------------------------------------
Version: ${VERSION}
Repo: https://github.com/Rebilly/ReDoc`;
export default (env: { standalone?: boolean } = {}) => ({ export default (env: { standalone?: boolean } = {}) => ({
entry: env.standalone ? ['./src/polyfills.ts', './src/standalone.tsx'] : './src/index.ts', entry: env.standalone ? ['./src/polyfills.ts', './src/standalone.tsx'] : './src/index.ts',
output: { output: {
@ -99,5 +106,6 @@ export default (env: { standalone?: boolean } = {}) => ({
__REDOC_REVISION__: REVISION, __REDOC_REVISION__: REVISION,
}), }),
new ForkTsCheckerWebpackPlugin({ silent: true }), new ForkTsCheckerWebpackPlugin({ silent: true }),
new webpack.BannerPlugin(BANNER)
], ],
}); });