Skip to content

Commit 4fabb73

Browse files
carlobeltramediegomura
authored andcommitted
Polyfill Buffer in our own code
This instance will only appear when including a font in the pdf
1 parent 72613ae commit 4fabb73

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/font/rollup.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import babel from '@rollup/plugin-babel';
22
import replace from '@rollup/plugin-replace';
33
import pkg from './package.json';
4+
import nodePolyfills from 'rollup-plugin-polyfill-node'
45

56
const cjs = {
67
format: 'cjs',
@@ -55,6 +56,9 @@ const getPlugins = ({ browser }) => [
5556
BROWSER: JSON.stringify(browser),
5657
},
5758
}),
59+
...(browser ? [
60+
nodePolyfills({ include: [ /\/font\/src\/.*\.js/, /polyfill/ ] }),
61+
] : []),
5862
];
5963

6064
const serverConfig = {

0 commit comments

Comments
 (0)