Comments (13)
@aksel Thanks for posting the link to the gist. Nested stacks will be coming shortly. I have a reasonable urgent need for them myself. I just need to find a chunk of time that I can dedicate to fixing all of the related issues.
from aws-sam-webpack-plugin.
I have almost gotten this to work, using the experimental project option.
It currently outputs each stack into its respective build folder, which I then have to manually combine. But I think that could be solved by output.path.
from aws-sam-webpack-plugin.
I ended up writing my own plugin, heavily inspired by yours.
Here's a gist
But I got it working, specifically for our use case, which is Node-only functions, only one depth of nested stacks (this breaks after second recursion), all of which are local, and organized in a specific folder structure.
It's also incredibly hacky when it comes to file paths and such. But it worksβ’
from aws-sam-webpack-plugin.
@aksel Thanks for posting the link to the gist. Nested stacks will be coming shortly. I have a reasonable urgent need for them myself. I just need to find a chunk of time that I can dedicate to fixing all of the related issues.
Hi @buggy how did you go with the nested stacks? I've been using your plugin and it works great, but recently split my cloud formation file into nested stacks as it was becoming too big to wrap my head around. I noticed that its sitting in the next milestone.
from aws-sam-webpack-plugin.
@danieljarrett74 It's a feature that I still want to implement but I haven't had the time to dedicate to it.
from aws-sam-webpack-plugin.
Hey! π I've been using this plugin on a project and it's been fantastic.
We're planning to move to nested stacks as our cloudformation file is getting too big.
This support for nested applications would be great!
from aws-sam-webpack-plugin.
@buggy Thanks for the update.
@artiomnist and @buggy I hacked away at a forked version of this the other morning and came up with this https://github.com/danieljarrett74/aws-sam-webpack-plugin . I've stripped out the vscode stuff and other bits to make it faster for me to modify it. But I am using it now and it works for me. However I'm finding my local machine chokes when webpack runs, comes close to running out of memory. I don't know if thats more a webpack thing or something with the way I've done the plugin.
Have a go with it @artiomnist if you want and let me know if it works ok for you. If it seems to work and anyone is interested I can break it off as its own thing and publish it to npm.
from aws-sam-webpack-plugin.
@danieljarrett74 - Hey this is Interesting I tried it out - but it doesn't seem to work with our nested stacks. Maybe because we're using Type: AWS::Serverless::Application
in our template. I tried adapting your plugin to work with Type: AWS::Serverless::Application
but had no luck!
I'm finding it slow on my local machine too - takes some time - but eventually manages to build- just missing the nested stack functions!
from aws-sam-webpack-plugin.
@danieljarrett74 - Hey this is Interesting I tried it out - but it doesn't seem to work with our nested stacks. Maybe because we're using
Type: AWS::Serverless::Application
in our template. I tried adapting your plugin to work withType: AWS::Serverless::Application
but had no luck!I'm finding it slow on my local machine too - takes some time - but eventually manages to build- just missing the nested stack functions!
Scratch that - I've managed to get a version of your hack to work with Type === AWS::Serverless::Application
- I've not written any unit tests for this - but from inital runs it seems to work. Maybe I can raise a PR to your project adding this in?
or maybe we can combine our efforts and get a PR for @buggy to review for nested stacks / nested applications.
from aws-sam-webpack-plugin.
@artiomnist yes I'm happy for you to add to this. And yes if @buggy wants to pull it back in go for it. But I have concerns that it's a big change and I've rearranged a lot of the existing code and it's not really tested well. The performance issue concerns me a bit, but It runs fine on github actions which works ok for me but maybe not others. @buggy what are your thoughts? did you want to use any of this fork and bring it back in to this project?
@artiomnist do you want to go ahead with your pull request?
from aws-sam-webpack-plugin.
I'll try to find some time this week to look at it. The first thing I want to understand is how SAM handles nested apps so I can maintain as much compatibility as possible.
from aws-sam-webpack-plugin.
@buggy Your plugin support many projects in sametime. I have not this situation in my project.
Can you attach filetree with templates that will simultaneously be few projects and nested stacks for testing
I will make changes to support nested stack and multi project.
from aws-sam-webpack-plugin.
I have put together an experimental version implementing this feature.
Reviews/comments would be greatly appreciated.
from aws-sam-webpack-plugin.
Related Issues (20)
- Support for DefinitionUri in AWS::Serverless: :StateMachine HOT 8
- Generated template file should always be `template.yaml` HOT 1
- Possible Bug with compiling the webpack code HOT 8
- Can't use ES6 import/export HOT 3
- Best way of building source code when other runtimes exist in the project HOT 1
- Improve webpack build performance HOT 2
- NodeJS14 Support HOT 1
- Debugging on VSCode: payload and env vars? HOT 1
- Support for Node 14 HOT 3
- Multiply write into .aws-sam/template.yaml
- Debugging is broken with VS Code 1.60.0 HOT 5
- build.toml HOT 3
- Build process is breaking GraphQL endpoint when running SAM Local
- Would be possible to watch only one function? HOT 2
- Remove `"module": "commonJS"` in TSConfig Example to support Tree Shaking?
- Question about how to override template parameter during webpack building HOT 2
- Add a tag for Nodejs18.x HOT 2
- SAM deploying TypeScript source code instead of the transpiled JavaScript HOT 2
- Support ES Modules HOT 2
- <Function name> has an unsupport Runtime. Must be nodejs10.x or nodejs12.x
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 aws-sam-webpack-plugin.