MCPcopy
hub / github.com/vitejs/vite / replaceModernEnvBabelPlugin

Function replaceModernEnvBabelPlugin

packages/plugin-legacy/src/index.ts:1061–1072  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1059}
1060
1061function 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
1074function wrapIIFEBabelPlugin(): BabelPlugin {
1075 return ({ types: t, template }): BabelPlugin => {

Callers 1

renderChunkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected