BROWSER_WITH_TRANSFORMED_PREFIXES

29 views
Skip to first unread message

Richard Connamacher

unread,
Sep 27, 2022, 2:02:03 PM9/27/22
to Closure Compiler Discuss
In the Closure Compiler command line docs, there's mention of an option --module_resolution=BROWSER_WITH_TRANSFORMED_PREFIXES, which sounds like it's a light superset of BROWSER with the option to map certain prefixes to local directories. Is there any documentation for how to use this, and how to configure the prefix transformations?

Would it support any kind of lookup logic? So say we imported a file with:

import "config/my-feature.js";

Can that be configured to look first in "config/environment/my-feature.js" then fall back to "config/generic/my-feature.js" if the first path doesn't exist?

Thanks!
Richard

Anna Sidorova

unread,
Sep 29, 2022, 4:24:20 AM9/29/22
to Closure Compiler Discuss
--browser_resolver_prefix_replacements option is used to configure prefixes in BROWSER_WITH_TRANSFORMED_PREFIXES mode. It is just a map from old prefix to new prefix, without support for a custom lookup logic.

Anna.
Reply all
Reply to author
Forward
0 new messages