mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-01-17 12:48:26 +01:00
ceed535efb
* fix packages imports * imports check scripts * update packages * svelte build improvements * build fix
38 lines
762 B
JavaScript
38 lines
762 B
JavaScript
import fs from 'fs'
|
|
import { getRollupConfig } from '../../.build/rollup-plugins.mjs'
|
|
import dts from "rollup-plugin-dts";
|
|
|
|
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
|
|
|
|
const outputFileName = 'tabler-icons-react';
|
|
const inputs = ['./src/tabler-icons-react.ts'];
|
|
const bundles = [
|
|
{
|
|
format: 'cjs',
|
|
extension: 'cjs',
|
|
inputs,
|
|
},
|
|
{
|
|
format: 'esm',
|
|
inputs,
|
|
preserveModules: true,
|
|
extension: 'mjs',
|
|
},
|
|
];
|
|
|
|
export default [
|
|
{
|
|
input: inputs[0],
|
|
output: [{
|
|
file: `dist/esm/${outputFileName}.d.ts`, format: 'esm'
|
|
}, {
|
|
file: `dist/cjs/${outputFileName}.d.cts`, format: 'cjs'
|
|
}],
|
|
plugins: [dts()],
|
|
},
|
|
|
|
...getRollupConfig(pkg, outputFileName, bundles, {
|
|
react: 'react'
|
|
})
|
|
];
|