1
0
Fork 0

chore(build): add banner to all builds

This commit is contained in:
François Chalifour 2020-08-26 10:18:05 +02:00
parent 214b9eb982
commit c2e5513c79

View file

@ -1,4 +1,10 @@
import { plugins } from '../../rollup.base.config';
import { checkIsReleaseReady } from '../scripts/checkIsReleaseReady';
import { getBundleBanner } from '../scripts/getBundleBanner';
import pkg from './package.json';
checkIsReleaseReady();
if (!process.env.BUILD) {
throw new Error('The `BUILD` environment variable is required to build.');
@ -10,11 +16,13 @@ const output = {
format: 'umd',
sourcemap: true,
name: 'docsearch',
banner: getBundleBanner(pkg),
},
esm: {
file: 'dist/esm/index.js',
format: 'es',
sourcemap: true,
banner: getBundleBanner(pkg),
},
};