(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("@babel/core"),require("babel-plugin-react-css-modules"),require("babel-plugin-module-resolver")):typeof define=="function"&&define.amd?define(["@babel/core","babel-plugin-react-css-modules","babel-plugin-module-resolver"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.index=t(e.core,e.babelPluginReactCssModules,e.babelPluginModuleResolver))})(this,function(e,t,o){"use strict";function i(a){const{...c}=a;let l;return{name:"vite-react-stylename",enforce:"pre",config(n){l=n.resolve.alias},transform(n,s){if(!/\.(t|j)sx?$/.test(s)||s.includes("node_modules")||!s.endsWith("x")&&!n.includes("react"))return null;const r=["jsx","importMeta"];/\.tsx?$/.test(s)&&r.push("typescript","decorators-legacy");const p=s.endsWith(".bs.js"),u=e.transformSync(n,{babelrc:!1,configFile:!1,filename:s,parserOpts:{sourceType:"module",allowAwaitOutsideFunction:!0,plugins:r},plugins:[[o,{alias:l,extensions:[".js",".jsx",".tsx",".ts"]}],[t,{autoResolveMultipleImports:!0,exclude:"node_modules",...c}]],ast:!p,sourceMaps:!0,sourceFileName:s});return{code:u.code,map:u.map}}}}return i});