2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-13 00:06:29 +00:00
iconify/components/react/rollup.config.js

37 lines
563 B
JavaScript
Raw Normal View History

2021-04-23 15:06:49 +00:00
import resolve from '@rollup/plugin-node-resolve';
const names = ['offline', 'iconify'];
2021-04-23 15:06:49 +00:00
const config = [];
2021-04-23 15:06:49 +00:00
// Write all packages
names.forEach((name) => {
// ES module
config.push({
2021-04-23 15:06:49 +00:00
input: `lib/${name}.js`,
output: [
{
2024-05-28 19:20:42 +00:00
file: `dist/${name}.js`,
2021-04-23 15:06:49 +00:00
format: 'esm',
},
],
external: ['react'],
plugins: [resolve()],
});
// CommonJS module
config.push({
2021-04-23 15:06:49 +00:00
input: `lib/${name}.js`,
output: [
{
2024-05-28 19:20:42 +00:00
file: `dist/${name}.cjs`,
2021-04-23 15:06:49 +00:00
format: 'cjs',
},
],
external: ['react'],
plugins: [resolve()],
});
});
2021-04-23 15:06:49 +00:00
export default config;