Skip to content

Commit

Permalink
chore(serve): remove index of compiler as name option
Browse files Browse the repository at this point in the history
  • Loading branch information
knagaitsev committed Aug 21, 2020
1 parent 3fbf389 commit e3df166
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/serve/src/getDevServerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ export default function getDevServerOptions(compiler, args): any {
const devServerOptions = [];
const compilers = compiler.compilers || [compiler];
if (args.name) {
let comp = compilers.find((comp) => comp.name === args.name);
// name could be an index to a compiler
if (!comp && /^[0-9]$/.test(args.name)) {
const index = +args.name;
comp = compilers[index];
}
const comp = compilers.find((comp) => comp.name === args.name);

if (comp && comp.options.devServer) {
devServerOptions.push(comp.options.devServer);
Expand Down

0 comments on commit e3df166

Please sign in to comment.