From f0d7da28dd1423dbf20bf203b3434108a42f0be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Am=C3=A9rico?= Date: Thu, 14 Nov 2019 21:50:30 -0300 Subject: [PATCH] Do not emit interopDefault helper --- CHANGELOG.md | 1 + rollup.config.js | 22 +++------------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bef297..4deb8f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/rollup.config.js b/rollup.config.js index 4801080..3cb3c45 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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