Skip to content

Commit b17428b

Browse files
committed
chore(serve): remove index of compiler as name option
1 parent 8c8a463 commit b17428b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/serve/src/getDevServerOptions.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ export default function getDevServerOptions(compiler, args): any {
1414
const devServerOptions = [];
1515
const compilers = compiler.compilers || [compiler];
1616
if (args.name) {
17-
let comp = compilers.find((comp) => comp.name === args.name);
18-
// name could be an index to a compiler
19-
if (!comp && /^[0-9]$/.test(args.name)) {
20-
const index = +args.name;
21-
comp = compilers[index];
22-
}
17+
const comp = compilers.find((comp) => comp.name === args.name);
2318

2419
if (comp && comp.options.devServer) {
2520
devServerOptions.push(comp.options.devServer);

0 commit comments

Comments
 (0)