From 4488107f89ffe65016fee254ca18e63ca6d28fae Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 27 May 2019 21:47:09 +0200 Subject: [PATCH] generate internal-exports file --- rollup.config.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index b32ce36a14..61798c2512 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -82,6 +82,16 @@ export default [ } ], external, - plugins: [ts_plugin] + plugins: [ + ts_plugin, + dir === 'internal' && { + generateBundle(options, bundle) { + const mod = bundle['internal.mjs']; + if (mod) { + fs.writeFileSync('src/compile/internal-exports.ts', `// This file is automatically generated\nexport default new Set(${JSON.stringify(mod.exports)});`); + } + } + } + ] })) ];