Last active
September 3, 2020 05:29
-
-
Save GitaiQAQ/21036df6ffefd48d22045fb677c10171 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import replace from '@rollup/plugin-replace'; | |
| let manifest = {}; | |
| export const replaceManifest = () => { | |
| return replace({ | |
| __MANIFEST__: () => JSON.stringify(manifest), | |
| }); | |
| }; | |
| export default () => ({ | |
| name: 'Manifest Collection', | |
| generateBundle(_, bundles) { | |
| manifest = { | |
| ...manifest, | |
| ...Object.assign.apply(null, Object.entries(bundles).map(([key, bundle]) => ({ | |
| [bundle.name]: key, | |
| }))), | |
| }; | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment