0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

generate internal-exports file

This commit is contained in:
Richard Harris 2019-05-27 21:47:09 +02:00
parent 76b02623a0
commit 7777bf0d81

View File

@ -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)});`);
}
}
}
]
}))
];