Skip to content

Commit e5759ff

Browse files
committed
Change Object.assigns to destructuring
1 parent b5bdf6b commit e5759ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let index = 0;
1313
module.exports = function(source, map) {
1414
this.cacheable();
1515

16-
const options = Object.assign({}, getOptions(this));
16+
const options = { ...getOptions(this) };
1717
const callback = this.async();
1818

1919
if (options.cssPath) {
@@ -55,7 +55,7 @@ module.exports = function(source, map) {
5555
);
5656

5757
if (options.hotReload && !isProduction && !isServer) {
58-
const hotOptions = Object.assign({}, options.hotOptions);
58+
const hotOptions = { ...options.hotOptions };
5959
const id = JSON.stringify(relative(process.cwd(), compileOptions.filename));
6060
js.code = makeHot(id, js.code, hotOptions, compiled, source, compileOptions);
6161
}

lib/hot-api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ export const applyHmr = makeApplyHmr(args => {
9999
accept,
100100
};
101101

102-
return Object.assign({}, args, { hot });
102+
return { ...args, hot };
103103
});

0 commit comments

Comments
 (0)