2
0
mirror of https://github.com/iconify/iconify.git synced 2024-10-23 17:12:03 +00:00
iconify/components/react/rollup.config.js
2022-11-17 11:46:29 +02:00

38 lines
583 B
JavaScript

import resolve from '@rollup/plugin-node-resolve';
const names = ['offline', 'iconify'];
const config = [];
// Write all packages
names.forEach((name) => {
// ES module
config.push({
input: `lib/${name}.js`,
output: [
{
file: `dist/${name}.mjs`,
format: 'esm',
},
],
external: ['react'],
plugins: [resolve()],
});
// CommonJS module
config.push({
input: `lib/${name}.js`,
output: [
{
file: `dist/${name}.js`,
format: 'cjs',
interop: false,
},
],
external: ['react'],
plugins: [resolve()],
});
});
export default config;