Skip to content

Commit 99bd643

Browse files
committed
create rollup config for processing polyfills
1 parent f35246f commit 99bd643

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// TODO: Swich out the sucrase hack for the real, currently-commented-out code once we switch sucrase builds on.
2+
3+
// export default ['esm', 'cjs'].map(format => ({
4+
export default ['esm', 'cjs'].map(format => {
5+
const config = {
6+
input: '../../rollup/jsPolyfills/index.js',
7+
output: {
8+
// preserveModules: true,
9+
dir: `jsPolyfills/${format}`,
10+
format,
11+
strict: false,
12+
},
13+
};
14+
// }));
15+
16+
// temporary hack for testing sucrase bundles before we switch over
17+
if (!process.version.startsWith('v8')) {
18+
console.log('Doing normal preserveModules in polyfill config');
19+
config.output.preserveModules = true;
20+
} else {
21+
console.log('Doing node 8 preserveModules in polyfill config');
22+
config.preserveModules = true;
23+
}
24+
25+
return config;
26+
});

0 commit comments

Comments
 (0)