Comments (6)
Ok figured out that the problem was just a wrong runtime version of node on azure :) so ncc is working amazingly! I will go for it
from nx-plugins.
First thing we need is a builder, becasue
- azure functions require js files per function
- all available builders create a single bundle
I have manually configured an nx app (based on @nrwl/node
that contains an azure function project which builds fine. But without the ability to output multiple files when building we would only able to create a single function per project :)
I'm no expert in webpack but looking at:
- the current node webpack config
- and this article
It looks doable without major surgery. That said I never build an angular builder :)
After getting azure functions to build the next would be to tackle:
- schematic for creating an azure function app
- schematic for adding new function
After that one can look creating schematics for specific apps like nest.
from nx-plugins.
Update:
- this following azure function webpack plugin looks promising. Its based on the previously azure-fucntion-pack package which is no longer maintained
- it scans the entry directory for
functions.json
files and uses those to build the individual functions
- it scans the entry directory for
- we would also need to resolve tsconfig patsh properly, luckily there seems to be a very well supported webpack plugin for handling that
from nx-plugins.
Thanks a lot for all the input! I will try to check how I can fit it into this project! But let's start with small steps. So the first thing we should do is to be able to deploy a nestjs app with 1 function. then we can go ahead with splitting into multiple functions.
I know from Kamil they are working on a feature there where you can set separate functions via decorator on modules. Hope this lands soon to nestjs
https://github.com/nestjs/serverless-core
from nx-plugins.
Not easy to integrate it as easy as possible :(
2 options are there:
- you need to maintain a separate package.json with all the dependencies for the node / nest app
- Find a way to automatically align all required dependencies. Here I am trying at the moment this package: https://github.com/zeit/ncc but seems not to work. Trying still to make a workable solution with it.
from nx-plugins.
Implemented first version by #24
from nx-plugins.
Related Issues (20)
- React application on Azure
- Github actions for tests
- Support for ExpressJS applications in nx with all cloud providers HOT 1
- Extend nx-deploy-it with tests
- Kubernetes integration HOT 17
- Ability to make a github release (tared file and under the releases tab) HOT 2
- Provide connection between apps
- New provider digital ocean HOT 5
- Update to Pulumi 2.0
- Add support for the new Azure Static Web Apps HOT 8
- Provide a generic way to deploy container based on @pulumi/cloud
- Deploying arbitrary services HOT 3
- npm WARN deprecated @zeit/[email protected]: @zeit/ncc is no longer maintained. Please use @vercel/ncc instead. HOT 3
- Deploy with Custom Webpack HOT 1
- Problem with installation on Windows 10 HOT 3
- Nx 11 workspace error while running deploy HOT 5
- Adding nx-deploy-it plugin results in error HOT 6
- nx-deploy-it could not be installed HOT 11
- No applications selected. Skipping setup Nothing to be done.
- Error “Cannot find project” when installing plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-plugins.