From b92879837d8b9461fb324606335c0f814ec55465 Mon Sep 17 00:00:00 2001 From: Matt Karl Date: Thu, 14 Jul 2022 18:29:11 -0400 Subject: [PATCH] Fix Rollup warning, ignore used node dependencies (#8493) --- bundles/pixi.js-node/package.json | 1 + rollup.config.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/pixi.js-node/package.json b/bundles/pixi.js-node/package.json index 7ff35cd720..f7cab2bf1d 100644 --- a/bundles/pixi.js-node/package.json +++ b/bundles/pixi.js-node/package.json @@ -71,6 +71,7 @@ "gl": "^5.0.0", "xml2js": "^0.4.23" }, + "nodeDependencies": ["fs", "path"], "publishConfig": { "access": "public" }, diff --git a/rollup.config.js b/rollup.config.js index b2681a0eba..5cf3e20dff 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -119,6 +119,7 @@ async function main() standalone, version, dependencies, + nodeDependencies, peerDependencies, // TODO: remove this in v7, along with the declaration in the package.json // This is a temporary fix to skip transpiling on the @pixi/node package @@ -137,7 +138,8 @@ async function main() // Check for bundle folder const external = Object.keys(dependencies || []) - .concat(Object.keys(peerDependencies || [])); + .concat(Object.keys(peerDependencies || [])) + .concat(nodeDependencies || []); const basePath = path.relative(__dirname, pkg.dir); const input = path.join(basePath, 'src/index.ts'); const freeze = false;