Skip to content

Commit

Permalink
chore: fix warnings during build (#2576)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored Jan 29, 2024
1 parent 3cb10b0 commit 364bdf4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/fns/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import babel from '@rollup/plugin-babel';
import pkg from './package.json';

const cjs = {
exports: 'named',
Expand Down
14 changes: 8 additions & 6 deletions packages/png-js/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion packages/textkit/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())];

Expand Down

0 comments on commit 364bdf4

Please sign in to comment.