import { __name } from './chunk-6AXVLTU5.js';
import { readFile } from '@stryke/fs/read-file';
import { normalizeWindowsPath } from '@stryke/path/correct-path';

function compilerPlugin(context, options) {
  return {
    name: "storm-stack:compiler",
    setup(build) {
      build.onLoad({
        filter: /\.ts$/
      }, async (args) => {
        return {
          contents: await context.compiler.compile(context, normalizeWindowsPath(args.path), await readFile(args.path), options)
        };
      });
    }
  };
}
__name(compilerPlugin, "compilerPlugin");

export { compilerPlugin };
//# sourceMappingURL=chunk-VWB436XK.js.map
//# sourceMappingURL=chunk-VWB436XK.js.map