From 364bdf4bb34b9efcd6ddf8a654a1b50568efd502 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Mon, 29 Jan 2024 11:56:09 +0100 Subject: [PATCH] chore: fix warnings during build (#2576) --- packages/fns/rollup.config.js | 1 - packages/png-js/rollup.config.js | 14 ++++++++------ packages/textkit/rollup.config.js | 6 +++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/fns/rollup.config.js b/packages/fns/rollup.config.js index a8d3e9e1c..a1698dc19 100644 --- a/packages/fns/rollup.config.js +++ b/packages/fns/rollup.config.js @@ -1,5 +1,4 @@ import babel from '@rollup/plugin-babel'; -import pkg from './package.json'; const cjs = { exports: 'named', diff --git a/packages/png-js/rollup.config.js b/packages/png-js/rollup.config.js index 0474b3371..facf21bcc 100644 --- a/packages/png-js/rollup.config.js +++ b/packages/png-js/rollup.config.js @@ -27,12 +27,14 @@ const babelConfig = () => ({ exclude: 'node_modules/**', }); -const getExternal = ({ browser }) => [ - ...(browser ? [] : ['fs']), - ...Object.keys(pkg.dependencies).filter( - dep => !browser || 'browserify-zlib' !== dep, - ), -]; +const getExternal = ({ browser }) => + browser + ? [ + ...Object.keys(pkg.dependencies).filter( + dep => dep !== 'browserify-zlib', + ), + ] + : ['fs', ...Object.keys(pkg.dependencies)]; const getPlugins = ({ browser }) => [ ...(browser diff --git a/packages/textkit/rollup.config.js b/packages/textkit/rollup.config.js index c3945267f..948ee5a77 100644 --- a/packages/textkit/rollup.config.js +++ b/packages/textkit/rollup.config.js @@ -23,7 +23,11 @@ const babelConfig = () => ({ const input = './src/index.js'; -const getExternal = () => [...Object.keys(pkg.dependencies), /@babel\/runtime/]; +const getExternal = () => [ + ...Object.keys(pkg.dependencies), + /@babel\/runtime/, + /hyphen/, +]; const getPlugins = () => [localResolve(), babel(babelConfig())];