storybook/lib/core/server.js
2021-02-04 01:19:26 +08:00

18 lines
486 B
JavaScript

/* eslint-disable global-require */
module.exports = {
buildStatic: (...args) => {
try {
return require('@storybook/server-webpack5').buildStatic(...args);
} catch (err) {
return require('@storybook/server-webpack4').buildStatic(...args);
}
},
buildDev: (...args) => {
try {
return require('@storybook/server-webpack5').buildDev(...args);
} catch (err) {
return require('@storybook/server-webpack4').buildStatic(...args);
}
},
};