-
Hi, guys. Storybook works well about importing fonts by import statement and register them to react-pdf, import NasuBoldFont from "app/assets/fonts/Nasu-Bold.ttf"
import NasuRegularFont from "app/assets/fonts/Nasu-Regular.ttf"
Font.register({ family: "Nasu-Regular", src: NasuRegularFont })
Font.register({ family: "Nasu-Bold", src: NasuBoldFont }) but, compile error is shown like I tried to add config.module.rules.push({
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: "file-loader",
}) Does anyone have any good idea? 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
dhythm
Aug 8, 2022
Replies: 1 comment
-
config.module.rules.push({
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: "url-loader",
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dhythm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
url-loader
works well.