I have issues with fs on my project when I try to use fontkit.
I'm using Nuxt js and when I try to open a font in a watch property of a component using:
const fontkit = require('fontkit')
const font = fontkit.openSync(pathToMyFont)
I get __webpack_require__(...).readFileSync is not a function
I tried to use 'fontkit/base', import fontkit instead of require it, change nuxt.config with "fs": "empty" but the issue still persist.
Any idea of how can I open my font?
I have issues with fs on my project when I try to use fontkit. I'm using Nuxt js and when I try to open a font in a watch property of a component using:
I get __webpack_require__(...).readFileSync is not a function
I tried to use 'fontkit/base', import fontkit instead of require it, change nuxt.config with "fs": "empty" but the issue still persist. Any idea of how can I open my font?