2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-22 17:58:57 +00:00
iconify/components/react/rollup.config.js
2024-05-28 22:20:42 +03:00

37 lines
563 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}.js`,
format: 'esm',
},
],
external: ['react'],
plugins: [resolve()],
});
// CommonJS module
config.push({
input: `lib/${name}.js`,
output: [
{
file: `dist/${name}.cjs`,
format: 'cjs',
},
],
external: ['react'],
plugins: [resolve()],
});
});
export default config;