mirror of
https://github.com/swc-project/swc.git
synced 2024-09-21 05:39:06 +03:00
fix(node/bundler): Prevent spreading string into return (#2335)
This commit is contained in:
parent
a7357ab517
commit
f42616698c
@ -22,7 +22,11 @@ export async function compileBundleOptions(config: BundleInput | string | undefi
|
|||||||
}
|
}
|
||||||
return configFromFile;
|
return configFromFile;
|
||||||
}
|
}
|
||||||
return Object.assign({}, configFromFile, config);
|
|
||||||
|
return {
|
||||||
|
...configFromFile,
|
||||||
|
...(typeof config === 'string') ? {} : config
|
||||||
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof f === 'string') {
|
if (typeof f === 'string') {
|
||||||
throw new Error(`Error occurred while loading config file at ${config}: ${e}`);
|
throw new Error(`Error occurred while loading config file at ${config}: ${e}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user