Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for NextJS Apps #371

Open
laurapadilla opened this issue Nov 16, 2022 · 1 comment
Open

Update README for NextJS Apps #371

laurapadilla opened this issue Nov 16, 2022 · 1 comment
Labels
docs Documentation related changes

Comments

@laurapadilla
Copy link

I added this in the Discussions but adding here as well for extra visibility

Hello! I am using the react95 package in a NextJS app and was getting an error because it wasn't able to properly load the fonts front the package. I think it's worth to update the README with the following instructions:

  • Add next-transpile-modules and next-fonts dependencies:
  npm install --save-dev next-transpile-modules next-fonts
  // or
  yarn add next-transpile-modules next-fonts
  • Edit your next.config.js file to something like:
const withFonts = require('next-fonts');
const withTM = require('next-transpile-modules')([
  'react95',
]);
module.exports = withTM(withFonts());
@WesSouza WesSouza added the docs Documentation related changes label Nov 28, 2022
@mohamm-ad
Copy link

hey! i was having a similar problem, and you can also solve it with nextjs support for local fonts: https://nextjs.org/docs/app/building-your-application/optimizing/fonts in your layout.tsx file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related changes
Projects
None yet
Development

No branches or pull requests

3 participants