File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
packages/app/src/sandbox/eval Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ export default class Manager {
349349 verifyTreeTranspiled ( ) {
350350 return Promise . all (
351351 this . getTranspiledModules ( )
352- . filter ( tModule => ! tModule . source )
352+ . filter ( tModule => tModule . shouldTranspile ( ) )
353353 . map ( tModule => tModule . transpile ( this ) )
354354 ) ;
355355 }
@@ -689,7 +689,13 @@ export default class Manager {
689689 ) ;
690690
691691 return Promise . all (
692- transpiledModulesToUpdate . map ( tModule => tModule . transpile ( this ) )
692+ transpiledModulesToUpdate . map ( tModule => {
693+ if ( tModule . shouldTranspile ( ) ) {
694+ return tModule . transpile ( this ) ;
695+ }
696+
697+ return Promise . resolve ( tModule ) ;
698+ } )
693699 ) ;
694700 }
695701
Original file line number Diff line number Diff line change @@ -292,6 +292,17 @@ export default class TranspiledModule {
292292 }
293293 }
294294
295+ /**
296+ * Determines if this is a module that should be transpiled if updated. If this
297+ * is a transpilationDependency that's updated then it should not get transpiled, but the parent should.
298+ */
299+ shouldTranspile ( ) {
300+ return (
301+ ! this . source &&
302+ ! ( this . initiators . size === 0 && this . transpilationInitiators . size > 0 )
303+ ) ;
304+ }
305+
295306 update ( module : Module ) : TranspiledModule {
296307 if ( this . module . path !== module . path || this . module . code !== module . code ) {
297308 this . module = module ;
You can’t perform that action at this time.
0 commit comments