Skip to content

Commit 19dbaee

Browse files
author
Ives van Hoorne
committed
Have a list of blacklisted dependencies
1 parent 5c90239 commit 19dbaee

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/app/src/sandbox/compile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,24 @@ const WHITELISTED_DEV_DEPENDENCIES = [
5252
'identity-obj-proxy',
5353
];
5454

55+
// Dependencies that we actually don't need, we will replace this by a dynamic
56+
// system in the future
57+
const BLACKLISTED_DEPENDENCIES = ['react-scripts'];
58+
5559
function getDependencies(parsedPackage) {
5660
const {
5761
dependencies: d = {},
5862
peerDependencies = {},
5963
devDependencies = {},
6064
} = parsedPackage;
6165

62-
const returnedDependencies = { ...d, ...peerDependencies };
66+
const returnedDependencies = { ...peerDependencies };
6367

68+
Object.keys(d).forEach(dep => {
69+
if (BLACKLISTED_DEPENDENCIES.indexOf(dep) !== -1) {
70+
returnedDependencies[dep] = d[dep];
71+
}
72+
});
6473
Object.keys(devDependencies).forEach(dep => {
6574
if (WHITELISTED_DEV_DEPENDENCIES.indexOf(dep) > -1) {
6675
returnedDependencies[dep] = devDependencies[dep];

0 commit comments

Comments
 (0)