{"version":3,"file":"pre-local.mjs","names":[],"sources":["../../src/pre-local.ts"],"sourcesContent":["import { assertIsString } from './helper';\nimport type SwcServerlessPlugin from './index';\n\nexport function preLocal(this: SwcServerlessPlugin) {\n  assertIsString(this.buildDirPath);\n\n  this.serviceDirPath = this.buildDirPath;\n  this.serverless.config.servicePath = this.buildDirPath;\n\n  // If this is a node function set the service path as CWD to allow accessing bundled files correctly\n  if (this.options.function && this.functions[this.options.function]) {\n    process.chdir(this.serviceDirPath);\n  }\n}\n"],"mappings":";;;;AAGA,SAAgB,WAAoC;AAClD,gBAAe,KAAK,aAAa;AAEjC,MAAK,iBAAiB,KAAK;AAC3B,MAAK,WAAW,OAAO,cAAc,KAAK;AAG1C,KAAI,KAAK,QAAQ,YAAY,KAAK,UAAU,KAAK,QAAQ,UACvD,SAAQ,MAAM,KAAK,eAAe;;;cAXI"}