mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 11:28:24 +02:00
fix(lucide-react-native): restore the icons entry point in the JS bundles (#4528)
This commit is contained in:
committed by
GitHub
parent
f07465f82e
commit
63369b1ac0
@@ -5,7 +5,7 @@ import pkg from './package.json' with { type: 'json' };
|
||||
const packageName = 'LucideReact';
|
||||
const outputFileName = 'lucide-react-native';
|
||||
const outputDir = 'dist';
|
||||
const inputs = ['src/lucide-react-native.ts'];
|
||||
const inputs = ['src/lucide-react-native.ts', 'src/icons/index.ts'];
|
||||
const bundles = [
|
||||
{
|
||||
format: 'cjs',
|
||||
@@ -22,34 +22,30 @@ const bundles = [
|
||||
},
|
||||
];
|
||||
|
||||
const configs = bundles
|
||||
.map(({ inputs, outputDir, format, preserveModules, extension = 'js' }) =>
|
||||
inputs.map((input) => ({
|
||||
input,
|
||||
plugins: plugins({ pkg }),
|
||||
external: ['react', 'react-native-svg'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
entryFileNames: `[name].${extension}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}.${extension}`,
|
||||
}),
|
||||
format,
|
||||
preserveModules,
|
||||
preserveModulesRoot: 'src',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
react: 'react',
|
||||
'react-native-svg': 'react-native-svg',
|
||||
},
|
||||
},
|
||||
})),
|
||||
)
|
||||
.flat();
|
||||
const configs = bundles.map(({ inputs, outputDir, format, preserveModules, extension = 'js' }) => ({
|
||||
input: inputs,
|
||||
plugins: plugins({ pkg }),
|
||||
external: ['react', 'react-native-svg'],
|
||||
output: {
|
||||
name: packageName,
|
||||
...(preserveModules
|
||||
? {
|
||||
dir: `${outputDir}/${format}`,
|
||||
entryFileNames: `[name].${extension}`,
|
||||
}
|
||||
: {
|
||||
file: `${outputDir}/${format}/${outputFileName}.${extension}`,
|
||||
}),
|
||||
format,
|
||||
preserveModules,
|
||||
preserveModulesRoot: 'src',
|
||||
sourcemap: true,
|
||||
globals: {
|
||||
react: 'react',
|
||||
'react-native-svg': 'react-native-svg',
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
export default [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user