Skip to content

Commit

Permalink
fix: exclude the sass dependency from the vanilla package
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Nov 20, 2024
1 parent b69e9bf commit e3bcddb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/createVanillaPackageJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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
}, {})

Expand Down

0 comments on commit e3bcddb

Please sign in to comment.