react-social-icons
Advanced tools
Comparing version 6.6.0 to 6.7.0
@@ -92,3 +92,3 @@ import * as React from 'react'; | ||
ref | ||
}, /*#__PURE__*/React.createElement("div", { | ||
}, /*#__PURE__*/React.createElement("span", { | ||
className: "social-container", | ||
@@ -95,0 +95,0 @@ style: social_container |
@@ -19,4 +19,4 @@ export { default as bandsintown } from './bandsintown.js'; | ||
export { default as groupme } from './groupme.js'; | ||
export { default as itchio } from './itch.io.js'; | ||
export { default as instagram } from './instagram.js'; | ||
export { default as itchio } from './itch.io.js'; | ||
export { default as itunes } from './itunes.js'; | ||
@@ -23,0 +23,0 @@ export { default as leetcode } from './leetcode.js'; |
@@ -19,4 +19,4 @@ import './icons/bandsintown.js'; | ||
import './icons/groupme.js'; | ||
import './icons/itch.io.js'; | ||
import './icons/instagram.js'; | ||
import './icons/itch.io.js'; | ||
import './icons/itunes.js'; | ||
@@ -23,0 +23,0 @@ import './icons/leetcode.js'; |
{ | ||
"name": "react-social-icons", | ||
"version": "6.6.0", | ||
"version": "6.7.0", | ||
"description": "beautiful, easy svg social icons in react", | ||
@@ -5,0 +5,0 @@ "main": "./dist/react-social-icons.cjs", |
@@ -336,1 +336,29 @@ # react-social-icons | ||
``` | ||
### Tree-shaking with Typescript causes a build error where the type declarations cannot be found | ||
When importing `react-social-icons/component` in a Typescript project, if your | ||
`tsconfig.json` is misconfigured you may run into the error message `TS2307: | ||
Cannot find module 'react-social-icons/component' or its corresponding type | ||
declarations`. | ||
To fix the issue, set `"moduleResolution"` in your `tsconfig.json` to | ||
`"bundler"`. | ||
The error occurs when the [`"moduleResolution"` | ||
property](https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution) | ||
in your Typescript configuration is set to some variant of `classic`, or | ||
`node`. Tree-shaking is a strategy of Node.js builds targeting a browser | ||
environment. They take advantage of a bundler feature provided by tools like | ||
[`webpack`](https://webpack.js.org/guides/tree-shaking/) or | ||
[`rollup`](https://rollupjs.org/introduction/#tree-shaking). If you are using | ||
`react-social-icons` in a project targeting a non-browser environment, you | ||
should use the `.cjs` build of this package, which will be resolved | ||
automatically if you import from `react-social-icons` in your project. | ||
```js | ||
// in server projects ("moduleResolution": "node" or "classic") | ||
import { SocialIcon } from 'react-social-icons' | ||
// in browser projects ("moduleResolution": "bundler") | ||
import { SocialIcon } from 'react-social-icons/component' | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
241333
364