closure-templates.patch 999 B

12345678910111213141516171819
  1. diff --git a/java/src/com/google/template/soy/SoyToJsSrcCompiler.java b/java/src/com/google/template/soy/SoyToJsSrcCompiler.java
  2. index b013b6c..d1f0bb5 100644
  3. --- a/java/src/com/google/template/soy/SoyToJsSrcCompiler.java
  4. +++ b/java/src/com/google/template/soy/SoyToJsSrcCompiler.java
  5. @@ -282,7 +282,12 @@ public final class SoyToJsSrcCompiler {
  6. sfs.compileToJsSrcFiles(
  7. outputPathFormat, inputPrefix, jsSrcOptions, locales, messageFilePathFormat);
  8. } else {
  9. - sfs.compileToJsSrcFiles(outputPathFormat, inputPrefix, jsSrcOptions, locales, null);
  10. + jsSrcOptions.setShouldDeclareTopLevelNamespaces(false);
  11. + jsSrcOptions.setShouldProvideRequireSoyNamespaces(false);
  12. + jsSrcOptions.setShouldProvideRequireJsFunctions(false);
  13. + jsSrcOptions.setShouldProvideBothSoyNamespacesAndJsFunctions(false);
  14. + jsSrcOptions.setShouldGenerateGoogModules(true);
  15. + sfs.compileToIncrementalDomSrcFiles(outputPathFormat, jsSrcOptions);
  16. }
  17. }
  18. }