Closed ivantacca closed 2 years ago
Try fontkit-next package
I tried with fontkit-next and got the same result
Check Figma’s fork https://github.com/figma/fontkit/
Actually I found a solution to my problem:
I added this plugin to my rollup.config.js
import commonjs from '@rollup/plugin-commonjs';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import copy from 'rollup-plugin-copy'
export default {
input: './index.js',
plugins: [
nodeResolve(),
commonjs(),
copy({
targets: [
{ src: 'node_modules/fontkit/*.trie', dest: 'build' },
]
})
],
output: [
{ file: 'build/fknbuild.umd.js', format: 'umd', name: 'fknbuild' },
],
}
It allows the copy of the .trie
files that are not included in my build.
I don't really know what these files contains but it seems they are created by the module
But my build was neither including nor creating them
Hi, I am not able to build my project using rollup. I am constantly getting this error:
I tried to isolate the problem creating another basic project with just an
index.js
with the only purpose of testing the rollup buildindex.js
rollup.config.js
Then, I tested the build (
umd
andcjs
)And finally got the error above.
I am new to rollup as well as node builds, so I apologize if I missed something clear.