serverless-plugin-typescript
serverless-plugin-typescript copied to clipboard
adds .mts to .mjs support, rather than throwing an error
Closes #294
Node.js 18.x requires files to be named .mjs instead of .js to use modern ES imports instead of module.exports. Typescript can be set up to compile it without issue using the .mts extension, but the plugin was failing before getting to the compile. This is just a quick little PR that resolves the issue. All tests / lints / etc pass, and I've tested locally and it works fine with sls deploy.