{"version":3,"file":"entry.mjs","names":[],"sources":["../../../../src/modules/bundler/plugins/entry.ts"],"sourcesContent":["import type { LoadResult, Plugin } from \"rolldown\";\n\nimport * as Path from \"node:path\";\n\ntype EntryOverriderOptions = {\n    file: string;\n    code: string;\n};\n\nconst entryOverrider = (options: EntryOverriderOptions): Plugin => {\n    const normalizeTarget: string = Path.resolve(options.file);\n\n    return {\n        name: \"@ammolite/transpiler/entry-overrider\",\n        load: (file: string): LoadResult => {\n            const normalizeSource: string = Path.resolve(file);\n            if (normalizeSource === normalizeTarget) return options.code;\n            return void 0;\n        },\n    };\n};\n\nexport type { EntryOverriderOptions };\nexport { entryOverrider };\n"],"mappings":";;AASA,MAAM,kBAAkB,YAA2C;CAC/D,MAAM,kBAA0B,KAAK,QAAQ,QAAQ,IAAI;CAEzD,OAAO;EACH,MAAM;EACN,OAAO,SAA6B;GAEhC,IADgC,KAAK,QAAQ,IAC3B,MAAM,iBAAiB,OAAO,QAAQ;EAE5D;CACJ;AACJ"}