File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-smooshpack" ,
3- "version" : " 0.0.6 " ,
3+ "version" : " 0.0.7 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "license" : " SEE LICENSE.MD IN ROOT" ,
Original file line number Diff line number Diff line change @@ -132,7 +132,16 @@ export default class PreviewManager {
132132 { }
133133 ) ;
134134
135- const packageJSON = JSON . parse ( files [ '/package.json' ] . code ) ;
135+ let packageJSON = generatePackageJSON (
136+ this . sandboxInfo . files ,
137+ this . sandboxInfo . dependencies ,
138+ this . sandboxInfo . entry
139+ ) ;
140+ try {
141+ packageJSON = JSON . parse ( files [ '/package.json' ] . code ) ;
142+ } catch ( e ) {
143+ console . error ( 'Could not parse package.json file: ' + e . message ) ;
144+ }
136145
137146 // TODO move this to a common format
138147 const normalizedModules = Object . keys ( files ) . reduce (
You can’t perform that action at this time.
0 commit comments