Merge pull request #1054 from blikblum/nointerop

Do not emit interopDefault helper
This commit is contained in:
Luiz Américo 2019-11-14 21:56:07 -03:00 committed by GitHub
commit b284473bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 19 deletions

View File

@ -4,6 +4,7 @@
- Fix infinite loop when an individual character is bigger than the width of the text.
- Fix infinite loop when text is positioned after page right margin
- Allow links in continued text to be stopped by setting link to null
- Do not emit _interopDefault helper in commonjs build
### [v0.10.0] - 2019-06-06

View File

@ -14,22 +14,6 @@ const external = [
'saslprep'
];
// supports using brfs transform
const stripFSInterop = function() {
return {
renderChunk(code) {
code = code.replace(
"var fs = _interopDefault(require('fs'));",
"var fs = require('fs');"
);
return {
code,
map: null
};
}
};
};
export default [
// CommonJS build for Node
{
@ -39,7 +23,8 @@ export default [
name: 'pdfkit',
file: pkg.main,
format: 'cjs',
sourcemap: true
sourcemap: true,
interop: false
},
plugins: [
babel({
@ -59,8 +44,7 @@ export default [
copy({
files: ['lib/font/data/*.afm'],
dest: 'js/data'
}),
stripFSInterop()
})
]
},
// ES for legacy (IE11) browsers