Skip to content

Commit 6e25562

Browse files
refactor: simplify feature creation
1 parent 327dc46 commit 6e25562

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/componentize.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ export async function componentize(
121121
const engine = getEnginePath(opts);
122122

123123
// Determine the default features that should be included
124-
const features = DEFAULT_FEATURES.reduce((acc, f) => {
124+
const features = new Set();
125+
for (let f of DEFAULT_FEATURES) {
125126
if (!disableFeatures.includes(f)) {
126-
acc.add(f);
127+
features.add(f);
127128
}
128-
return acc;
129-
}, new Set());
129+
}
130130

131131
if (!jsSource && sourcePath) {
132132
jsSource = await readFile(sourcePath, 'utf8');

0 commit comments

Comments
 (0)