File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/storybook-builder/src Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,15 @@ export const CANDIDATES = [
91
91
'color-convert' ,
92
92
] ;
93
93
94
+ function moduleExists ( moduleName : string ) {
95
+ try {
96
+ require . resolve ( moduleName , { paths : [ process . cwd ( ) ] } ) ;
97
+ return true ;
98
+ } catch ( e ) {
99
+ return false ;
100
+ }
101
+ }
102
+
94
103
/**
95
104
* Get react-dom version from the resolvedReact preset, which points to either a root react-dom
96
105
* dependency or the react-dom dependency shipped with addon-docs
@@ -121,12 +130,3 @@ async function getReactDomShimAlias(options: Options) {
121
130
? require . resolve ( '@storybook/react-dom-shim' )
122
131
: require . resolve ( '@storybook/react-dom-shim/dist/react-16' ) ;
123
132
}
124
-
125
- function moduleExists ( moduleName : string ) {
126
- try {
127
- require . resolve ( moduleName , { paths : [ process . cwd ( ) ] } ) ;
128
- return true ;
129
- } catch ( e ) {
130
- return false ;
131
- }
132
- }
You can’t perform that action at this time.
0 commit comments