From e3bcddb16c6c6a16e3d0f1484f74404a41176429 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 20 Nov 2024 09:36:11 +0100 Subject: [PATCH] fix: exclude the `sass` dependency from the vanilla package --- tools/createVanillaPackageJson.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/createVanillaPackageJson.js b/tools/createVanillaPackageJson.js index d528a16b..ddc1458b 100644 --- a/tools/createVanillaPackageJson.js +++ b/tools/createVanillaPackageJson.js @@ -9,6 +9,8 @@ const vanillaPackageFolder = getAbsolutePath(import.meta.url, '..', 'package-van const pkg = JSON.parse(String(readFileSync(getAbsolutePath(import.meta.url, '..', 'package.json')))) +const excludedDependencies = ['sass'] + // We move peerDependencies to dependencies to make the package standalone. // This is necessary for the "svelte" dependency, which is needed to export the TypeScript types const usedDependencyNames = [ @@ -17,7 +19,12 @@ const usedDependencyNames = [ ].sort() const usedDependencies = usedDependencyNames.reduce((deps, name) => { + if (excludedDependencies.includes(name)) { + return deps + } + deps[name] = pkg.dependencies[name] || pkg.peerDependencies[name] + return deps }, {})