Skip to content

Commit 4f6c19d

Browse files
committed
fallback in favor of lodash.assign instead of object.assign in order to support older nodejs versions
1 parent 419df4c commit 4f6c19d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "css-modules-require-hook",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "A require hook to compile CSS Modules on the fly",
55
"main": "index.js",
66
"engines": {
@@ -10,6 +10,7 @@
1010
"debug": "^2.2.0",
1111
"generic-names": "^1.0.1",
1212
"icss-replace-symbols": "^1.0.2",
13+
"lodash.assign": "^3.2.0",
1314
"lodash.foreach": "^3.0.3",
1415
"lodash.identity": "^3.0.0",
1516
"lodash.isarray": "^3.0.4",

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import assign from 'lodash.assign';
12
import debug from 'debug';
23
import hook from './hook';
34
import identity from 'lodash.identity';
@@ -61,7 +62,7 @@ function fetch(to, from) {
6162
debugFetch({cache: false, filename});
6263
const CSSSource = preProcess(readFileSync(filename, 'utf8'), filename);
6364
// https://github.com/postcss/postcss/blob/master/docs/api.md#processorprocesscss-opts
64-
const lazyResult = instance.process(CSSSource, Object.assign(processorOptions, {from: filename}));
65+
const lazyResult = instance.process(CSSSource, assign(processorOptions, {from: filename}));
6566

6667
// https://github.com/postcss/postcss/blob/master/docs/api.md#lazywarnings
6768
lazyResult.warnings().forEach(message => console.warn(message.text));

0 commit comments

Comments
 (0)