File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
packages/app/src/sandbox/eval Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,16 @@ function isVersion2(configurations) {
1414 configurations &&
1515 configurations . package &&
1616 configurations . package . parsed &&
17- configurations . package . parsed . dependencies
17+ configurations . package . parsed . dependencies &&
18+ configurations . package . parsed . dependencies [ 'react-scripts' ]
1819 ) {
1920 const reactScriptsVersion =
2021 configurations . package . parsed . dependencies [ 'react-scripts' ] ;
2122
22- return semver . satisfies ( reactScriptsVersion , '^2.0.0' ) ;
23+ return semver . intersects ( reactScriptsVersion , '^2.0.0' ) ;
2324 }
2425
25- return false ;
26+ return true ;
2627}
2728
2829export default function initialize ( ) {
@@ -40,6 +41,7 @@ export default function initialize() {
4041 config : {
4142 plugins : [
4243 'babel-plugin-macros' ,
44+ 'proposal-class-properties' ,
4345 'proposal-object-rest-spread' ,
4446 'transform-runtime' ,
4547 'syntax-dynamic-import' ,
Original file line number Diff line number Diff line change @@ -401,7 +401,8 @@ export default class TranspiledModule {
401401 } ,
402402 addDependency : ( depPath : string , options = { } ) => {
403403 if (
404- depPath . startsWith ( '@babel/runtime/' ) ||
404+ ( ! this . module . path . startsWith ( '/node_modules' ) &&
405+ depPath . startsWith ( '@babel/runtime/' ) ) ||
405406 depPath . startsWith ( 'codesandbox-api' )
406407 ) {
407408 return ;
@@ -836,7 +837,8 @@ export default class TranspiledModule {
836837 // So it must be a dependency
837838 if (
838839 path . startsWith ( 'codesandbox-api' ) ||
839- path . startsWith ( '@babel/runtime/' )
840+ ( ! transpiledModule . module . path . startsWith ( '/node_modules' ) &&
841+ path . startsWith ( '@babel/runtime/' ) )
840842 ) {
841843 return resolveDependency ( path , manager . externals ) ;
842844 }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class SvelteTranspiler extends WorkerTranspiler {
2020 packageJSON . parsed &&
2121 packageJSON . parsed . devDependencies &&
2222 packageJSON . parsed . devDependencies . svelte &&
23- semver . satisfies ( packageJSON . parsed . devDependencies . svelte , '^2.0.0' ) ;
23+ semver . intersects ( packageJSON . parsed . devDependencies . svelte , '^2.0.0' ) ;
2424
2525 return new Promise ( ( resolve , reject ) => {
2626 const path = loaderContext . path ;
You can’t perform that action at this time.
0 commit comments