Git Product home page Git Product logo

Comments (13)

buggy avatar buggy commented on June 3, 2024 7

@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.

aksel avatar aksel commented on June 3, 2024

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.

aksel avatar aksel commented on June 3, 2024

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.

danieljarrett74 avatar danieljarrett74 commented on June 3, 2024

@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.

buggy avatar buggy commented on June 3, 2024

@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.

artiomnist avatar artiomnist commented on June 3, 2024

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.

danieljarrett74 avatar danieljarrett74 commented on June 3, 2024

@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.

artiomnist avatar artiomnist commented on June 3, 2024

@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.

artiomnist avatar artiomnist commented on June 3, 2024

@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!

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.

danieljarrett74 avatar danieljarrett74 commented on June 3, 2024

@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.

buggy avatar buggy commented on June 3, 2024

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.

baxneo avatar baxneo commented on June 3, 2024

@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.

sam-holder-zava avatar sam-holder-zava commented on June 3, 2024

I have put together an experimental version implementing this feature.
Reviews/comments would be greatly appreciated.

from aws-sam-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.