Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit 473b556

Browse files
committed
re-add merge to get right structure
1 parent 2c036c9 commit 473b556

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

variableCombinePlugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const fs = require('fs');
2+
const mergeVarUsages = require('./lib/merge-var-usages');
23

34
module.exports = ({allCssVars, filename}) => ( {
45
apply: (compiler) => {
@@ -15,7 +16,7 @@ module.exports = ({allCssVars, filename}) => ( {
1516
}, {});
1617
fs.writeFile(
1718
`${filename || 'css-variables.json'}`,
18-
JSON.stringify(vars, null, 2),
19+
JSON.stringify(mergeVarUsages(vars, {}), null, 2),
1920
err => !!err && console.log('ERROR writing file', err)
2021
);
2122
});

0 commit comments

Comments
 (0)