serverless-plugin-typescript icon indicating copy to clipboard operation
serverless-plugin-typescript copied to clipboard

adds .mts to .mjs support, rather than throwing an error

Open cwbuecheler opened this issue 2 years ago • 0 comments

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.

cwbuecheler avatar Jun 15 '23 20:06 cwbuecheler