storybook/addons/docs/common/makePreset.js
2019-07-29 15:07:41 +08:00

17 lines
361 B
JavaScript

const fs = require('fs');
const common = require('./preset');
module.exports = framework => {
const frameworkConfig = `${__dirname}/../${framework}/config.js`;
const preconfig = fs.existsSync(frameworkConfig) ? [frameworkConfig] : [];
function config(entry = []) {
return [...preconfig, ...entry];
}
return {
...common,
config,
};
};