Skip to content

Commit

Permalink
Tweaked Sandpack Dependencies Config
Browse files Browse the repository at this point in the history
  • Loading branch information
bbazukun123 committed Dec 19, 2023
1 parent 7bd5b84 commit 05d2da4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ const useDependencies = ({ isPixiWebWorkerVersion, isPixiDevVersion, pixiVersion
const pixiPackageName = isPixiWebWorkerVersion ? '@pixi/webworker' : 'pixi.js';
const getPackageVersion = (packageName: string) =>
(isPixiDevVersion ? `${pixiVersion}/${packageName}` : pixiVersion);
const packages = [pixiPackageName, '@pixi/graphics-extras', '@pixi/math-extras'];
const packages = [pixiPackageName];

// Add these packages if we're using a version of pixi that doesn't have them built in, ie. < v8
if (Number(pixiVersion.split('.')[0]) < 8)
{
packages.push('@pixi/graphics-extras', '@pixi/math-extras');
}

const dependencies = packages.reduce(
(deps, packageName) => ({
Expand Down

0 comments on commit 05d2da4

Please sign in to comment.