-
-
Notifications
You must be signed in to change notification settings - Fork 205
Update README for NextJS #370
-
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-modulesandnext-fontsdependencies:
npm install --save-dev next-transpile-modules next-fonts
// or
yarn add next-transpile-modules next-fonts
- Edit your
next.config.jsfile to something like:
const withFonts = require('next-fonts');
const withTM = require('next-transpile-modules')([
'react95',
]);
module.exports = withTM(withFonts());
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
Hey @laurapadilla, thanks for reaching out! <3
Are there any other extra steps you need to take to use react95 in a Next app besides the font loading thing? or are there any other advices to make the process easier? if so, we could create separate markdown file with instructions specifically for Next.js.
If not, then I think we could just add this below the Getting started section of our README. 🤓
Beta Was this translation helpful? Give feedback.
All reactions
-
@arturbien yep I think it was just the font loading thing! I can't remember the specific error but it was something like we can't load ms_sans_serif and adding that bit of code fixed the error. If I come across anything else I'll let you know :)
Beta Was this translation helpful? Give feedback.
All reactions
-
ok. let's wait then and when you're ready would you be kind to submit a PR? :) good to have another contributor here!
Beta Was this translation helpful? Give feedback.