Skip to content

Commit d545b44

Browse files
committed
Update export data for reference error
1 parent e22a10a commit d545b44

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/core/src/lib/exportData.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ module.exports = function(patternlab) {
8585
);
8686
});
8787

88-
//add module.export to end of file.
89-
output +=
90-
'module.exports = { config, ishControls, navItems, patternPaths, viewAllPaths, plugins };';
88+
// add module.export to the Nodejs-specific file generated.
89+
const exportedOutput =
90+
output +
91+
'module.exports = { config, ishControls, navItems, patternPaths, viewAllPaths, plugins, defaultShowPatternInfo, defaultPattern };';
9192

9293
//write all output to patternlab-data
9394
_.each(patternlab.uikits, uikit => {
@@ -98,6 +99,13 @@ module.exports = function(patternlab) {
9899
),
99100
output
100101
);
102+
fs.outputFileSync(
103+
path.resolve(
104+
path.join(process.cwd(), uikit.outputDir, paths.public.data),
105+
'patternlab-data.cjs.js'
106+
),
107+
exportedOutput
108+
);
101109
});
102110

103111
return output;

0 commit comments

Comments
 (0)