Skip to content

Commit

Permalink
Fix bundle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaKozlova committed Dec 20, 2022
1 parent 7f6893d commit 9466948
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/react-native-icons/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["@griffel"],
"presets": ["@babel/preset-typescript"],
"compact": false
}
4 changes: 2 additions & 2 deletions packages/react-native-icons/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ function processFiles(src, dest) {
// Finally add the interface definition and then write out the index.
indexContents.push('export { FluentReactNativeIconsProps } from \'./utils/FluentReactNativeIconsProps.types\'');
indexContents.push('export { default as wrapIcon } from \'./utils/wrapIcon\'');
indexContents.push('export { default as bundleIcon } from \'./utils/bundleIcon\'');
//indexContents.push('export { default as bundleIcon } from \'./utils/bundleIcon\'');
indexContents.push('export * from \'./utils/useIconState\'');
indexContents.push('export * from \'./utils/constants\'');
//indexContents.push('export * from \'./utils/constants\'');

fs.writeFileSync(indexPath, indexContents.join('\n'), (err) => {
if (err) throw err;
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"tslib": "^2.1.0"
},
"peerDependencies": {
"react": ">=16.8.0 <19.0.0"
"react": ">=16.8.0 <19.0.0",
"react-native": "^0.68.0"
},
"files": [
"lib/",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native-icons/src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'react-native-svg';
declare module 'react-native-svg' {
export interface SvgProps {
xmlns?: string;
}
}
3 changes: 2 additions & 1 deletion packages/react-native-icons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"skipLibCheck": true,
"outDir": "lib",
"target": "ES6",
"module": "esnext",
Expand All @@ -14,6 +15,6 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": ["src"],
"include": ["src", "custom.d.ts"],
"exclude": ["lib", "lib-cjs"]
}

0 comments on commit 9466948

Please sign in to comment.