serverless / serverless-azure-functions

Serverless Azure Functions Plugin – Add Azure Functions support to the Serverless Framework
MIT License
267 stars 162 forks source link

SLS Offline don't run webpack build with TypeScript #392

Closed s-stefanov closed 4 years ago

s-stefanov commented 5 years ago

This is a Bug Report

Description

Similar or dependent issues:

Additional Data

tbarlow12 commented 5 years ago

We have not added support for TypeScript just yet. It's on the roadmap. #366

s-stefanov commented 5 years ago

Yes, I understand that. But when I run sls deploy or sls package the correct zip file is created (with JS files) and uploaded to Azure. Functions are executed correctly also. My problem is to run Webpack build on local sls offline before func host start command. Can this be made?

s-stefanov commented 5 years ago

@tbarlow12 The same issue is with modern JavaScript syntax and babel/webpack build to support it. How can I run the webpack on sls offline?

cyppher commented 4 years ago

@tbarlow12 We have written our functions in ES6+ including ES-modules (import). Running sls deploy does in fact transpile code perfectly, however sls offline gives us Javascript errors about not supported ES6 code (such as import / export).

How can we run sls offline and make sure Webpack / Babel is transpiling code as it does with sls deploy?