* Remap external modules that rely on React if building for Preact. * @param {'preact' | 'react'} buildFor * @return {object}
(buildFor)
| 47 | * @return {object} |
| 48 | */ |
| 49 | function 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. |