Skip to content

Commit

Permalink
Polyfill Buffer in our own code
Browse files Browse the repository at this point in the history
This instance will only appear when including a font in the pdf
  • Loading branch information
carlobeltrame authored and diegomura committed Jul 4, 2022
1 parent 72613ae commit 4fabb73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/font/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import babel from '@rollup/plugin-babel';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';
import nodePolyfills from 'rollup-plugin-polyfill-node'

const cjs = {
format: 'cjs',
Expand Down Expand Up @@ -55,6 +56,9 @@ const getPlugins = ({ browser }) => [
BROWSER: JSON.stringify(browser),
},
}),
...(browser ? [
nodePolyfills({ include: [ /\/font\/src\/.*\.js/, /polyfill/ ] }),
] : []),
];

const serverConfig = {
Expand Down

0 comments on commit 4fabb73

Please sign in to comment.