diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-03-03 08:18:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 22:18:27 +0100 |
commit | 83d902a7803adb0c69fe2c98e692a50dae446db9 (patch) | |
tree | 75d15519f15748a0c3d016d0ed4e8f1d8389185d /cli/js/compiler_sourcefile.ts | |
parent | a3c3a56ff71c325ea4807548484023c95ffdcd77 (diff) |
Fix JavaScript dependencies in bundles. (#4215)
Fixes #4602
We turned off `allowJs` by default, to keep the compiler from grabbing
a bunch of files that it wouldn't actually do anything useful with. On
the other hand, this caused problems with bundles, where the compiler
needs to gather all the dependencies, including JavaScript ones. This
fixes this so that when we are bundling, we analyse JavaScript imports
in the compiler.
Diffstat (limited to 'cli/js/compiler_sourcefile.ts')
-rw-r--r-- | cli/js/compiler_sourcefile.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/js/compiler_sourcefile.ts b/cli/js/compiler_sourcefile.ts index 23fefbf41..cc7d4aa3e 100644 --- a/cli/js/compiler_sourcefile.ts +++ b/cli/js/compiler_sourcefile.ts @@ -91,7 +91,7 @@ export class SourceFile { } /** Process the imports for the file and return them. */ - imports(checkJs: boolean): Array<[string, string]> { + imports(processJsImports: boolean): Array<[string, string]> { if (this.processed) { throw new Error("SourceFile has already been processed."); } @@ -134,7 +134,7 @@ export class SourceFile { } } else if ( !( - !checkJs && + !processJsImports && (this.mediaType === MediaType.JavaScript || this.mediaType === MediaType.JSX) ) |