-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chunks doesn't work with goog.requireType #9
Comments
We should be able to fix this without changes to the deps file. It will just requiring parsing and traversing the AST for every closure-library file because we can't depend on the deps.js file to correctly list the inputs. It's not a big change, but it will likely be a hit to the speed of the tool. |
The code to detect an add |
This is transferred from google/closure-compiler#3931
Closure Compiler introduces
closure-calculate-chunks
as a tool to create an option to use chunks.https://github.com/google/closure-compiler/wiki/Chunk-output-for-dynamic-loading#asking-closure-compiler-to-produce-chunks---the-easy-way
But it doesn't work well when we have a dependency referenced by
goog.requireType
becausegoogle-closure-deps
doesn't list files referenced bygoog.requireType
as dependencies.closure-calculate-chunks
accepts thedeps.js
generated bygoogle-closure-deps
so it means thatclosure-calculate-chunks
cannot recognize the file because the file isn't in thedeps.js
.I think this is caused by the following problems
google-closure-deps
doesn't list files referenced bygoog.requireType
(this is not a problem of Closure Compiler itself)goog.requireType
as inputs of chunks--js
options unless the dependencies don't include any circular dependency.If Closure Compiler won't support the case of a circular dependency caused by dependencies of
goog.requireType
, this seems to be solved only by fixinggoogle-closure-deps
.The text was updated successfully, but these errors were encountered: