( config: ResolvedConfig, )
| 142 | } |
| 143 | |
| 144 | export async function getHmrImplementation( |
| 145 | config: ResolvedConfig, |
| 146 | ): Promise<string> { |
| 147 | const content = fs.readFileSync(normalizedClientEntry, 'utf-8') |
| 148 | const replacer = await createClientConfigValueReplacer(config) |
| 149 | return ( |
| 150 | replacer(content) |
| 151 | // the rolldown runtime cannot import a module |
| 152 | .replace(/import\s*['"]@vite\/env['"]/, '') |
| 153 | ) |
| 154 | } |
no test coverage detected