()
| 1059 | } |
| 1060 | |
| 1061 | function replaceModernEnvBabelPlugin(): BabelPlugin { |
| 1062 | return ({ types: t }): BabelPlugin => ({ |
| 1063 | name: 'vite-replace-env-modern', |
| 1064 | visitor: { |
| 1065 | Identifier(path) { |
| 1066 | if (path.node.name === modernEnvVarMarker) { |
| 1067 | path.replaceWith(t.booleanLiteral(false)) |
| 1068 | } |
| 1069 | }, |
| 1070 | }, |
| 1071 | }) |
| 1072 | } |
| 1073 | |
| 1074 | function wrapIIFEBabelPlugin(): BabelPlugin { |
| 1075 | return ({ types: t, template }): BabelPlugin => { |