( pluginContext: PluginContext, id: string, asFileUrl = false, )
| 318 | } |
| 319 | |
| 320 | export async function fileToUrl( |
| 321 | pluginContext: PluginContext, |
| 322 | id: string, |
| 323 | asFileUrl = false, |
| 324 | ): Promise<string> { |
| 325 | const { environment } = pluginContext |
| 326 | if (!environment.config.isBundled) { |
| 327 | return fileToDevUrl(environment, id, asFileUrl) |
| 328 | } else { |
| 329 | return fileToBuiltUrl(pluginContext, id) |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | export async function fileToDevUrl( |
| 334 | environment: Environment, |