MCPcopy
hub / github.com/ampproject/amphtml / moduleAliases

Function moduleAliases

build-system/babel-config/import-resolver.js:49–57  ·  view source on GitHub ↗

* Remap external modules that rely on React if building for Preact. * @param {'preact' | 'react'} buildFor * @return {object}

(buildFor)

Source from the content-addressed store, hash-verified

47 * @return {object}
48 */
49function moduleAliases(buildFor) {
50 if (buildFor === 'react') {
51 return {};
52 }
53 return {
54 'react': './src/react',
55 'react-dom': './src/react/dom',
56 };
57}
58
59/**
60 * Import map configuration.

Callers 1

getImportResolverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected