( filename: string, htmlPath: string, config: ResolvedConfig, )
| 101 | } |
| 102 | |
| 103 | function toAssetPathFromHtml( |
| 104 | filename: string, |
| 105 | htmlPath: string, |
| 106 | config: ResolvedConfig, |
| 107 | ): string { |
| 108 | const relativeUrlPath = normalizePath(path.relative(config.root, htmlPath)) |
| 109 | const toRelative = (filename: string, _hostId: string) => |
| 110 | getBaseInHTML(relativeUrlPath, config) + filename |
| 111 | return toOutputFilePathInHtml( |
| 112 | filename, |
| 113 | 'asset', |
| 114 | htmlPath, |
| 115 | 'html', |
| 116 | config, |
| 117 | toRelative, |
| 118 | ) |
| 119 | } |
| 120 | |
| 121 | const legacyEnvVarMarker = `__VITE_IS_LEGACY__` |
| 122 | const modernEnvVarMarker = `__VITE_IS_MODERN__` |
no test coverage detected