azure-functions-typescript icon indicating copy to clipboard operation
azure-functions-typescript copied to clipboard

automatic detection of functions by webpack

Open amrfarid140 opened this issue 7 years ago • 2 comments

I'm submitting a ... (check one with "x")

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request

Current behavior As far as I understand, with the current Webpack configuration will need to be updated every time a new Function is created. It makes life difficult, especially when you are migrating an existing project to use this template.

Expected/desired behavior

Automatically detect functions under src directory and bundle them invidually.

This can be achieved by adding an extra helper method to get all the directories under src and create webpack entry object.

To make things smooth, I used Parllel Webpack to do the bundling in parallel.

I already have such setup working in my project and I would be more than happy to share the setup if you are intersted.

amrfarid140 avatar May 04 '18 16:05 amrfarid140

@amrfarid140 although the aim is not to include a great number of functions within a single function app, there may be several cases when a single function app has to host (for example) a dozen of functions.

I suppose I'll have a look at parallel-webpack plugin as soon as I'll have some time, and share the results with you. This way we may build more or less a roadmap, with several more useful features (would be really cool) and let the magic happen 👍

fulls1z3 avatar May 05 '18 22:05 fulls1z3

@amrfarid140 meanwhile, please feel free to share any ideas as they come by, as well as pull requests (they're really very welcome) 😄

fulls1z3 avatar May 05 '18 22:05 fulls1z3