fix(server) proper handle loaders option
This commit is contained in:
@@ -25,6 +25,7 @@ export default class LayServer {
|
||||
|
||||
for (const key of optionKeys) {
|
||||
if (!this.options.has(key)) continue;
|
||||
if (key == 'loaders') continue;
|
||||
const valueType = typeof this.options.get(key);
|
||||
if (
|
||||
typeof options[key] !== 'undefined' &&
|
||||
@@ -33,6 +34,12 @@ export default class LayServer {
|
||||
)
|
||||
this.options.set(key, options[key]);
|
||||
}
|
||||
|
||||
if (options.hasOwnProperty('loaders')) {
|
||||
if (options.loaders instanceof Map) {
|
||||
this.loaders = options.loaders;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.initRouting(options.router);
|
||||
|
||||
Reference in New Issue
Block a user