import * as path from "path" ; import type * as esbuild from "esbuild" ; export const loaders = { ".aac" : "file" , ".css" : "file" , ".eot" : "file" , ".flac" : "file" , ".gif" : "file" , ".jpeg" : "file" , ".jpg" : "file" , ".js" : "jsx" , ".jsx" : "jsx" , ".json" : "json" , ".md" : "jsx" , ".mdx" : "jsx" , ".mp3" : "file" , ".mp4" : "file" , ".ogg" : "file" , ".otf" : "file" , ".png" : "file" , ".svg" : "file" , ".ts" : "ts" , ".tsx" : "tsx" , ".ttf" : "file" , ".wav" : "file" , ".webm" : "file" , ".webp" : "file" , ".woff" : "file" , ".woff2" : "file" } ; export function getLoaderForFile ( file ) { let ext = path . extname ( file ) ; if ( ext in loaders ) return loaders [ ext ] ; throw new Error ( `Cannot get loader for file ${ file }` ) ; }