Skip to content

Commit

Permalink
Docs(icons): Transpile icons #DS-987
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Nov 21, 2024
1 parent e967c27 commit c3e5229
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,23 @@ export const Icon = ({ name, , size }) => {
};
```

### Next.js with Pages Router

If you are using Next.js with the Pages Router, it is necessary to add the following configuration to your Next.js configuration file
to transpile the `@lmc-eu/spirit-web-react` package, ensuring the correct functionality of the icons:

```javascript
const nextConfig = {
transpilePackages: ['@lmc-eu/spirit-web-react'],
// other configurations...
};

export default nextConfig;
```

This configuration is not required if you are using the Next.js App Router.

For more information, please see the [Next.js documentation][nextjs-transpilePackages].

[`spirit-web`]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web
[nextjs-transpilePackages]: https://nextjs.org/docs/pages/api-reference/next-config-js/transpilePackages

0 comments on commit c3e5229

Please sign in to comment.