chore(build): add banner to all builds
This commit is contained in:
parent
214b9eb982
commit
c2e5513c79
1 changed files with 8 additions and 0 deletions
|
|
@ -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),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue