Code Monkey home page Code Monkey logo

Comments (14)

PatrykMilewski avatar PatrykMilewski commented on May 20, 2024 2

I just tested it and it works great! Thank you @olup for fixing this issue!

from serverless-esbuild.

dashmug avatar dashmug commented on May 20, 2024 1

My workaround is to use the include.

functions:
  MyAPI:
    handler: src/core/my/handler.api
    package:
      include:
        - '!**'
        - 'src/core/my/**'
  TheirAPI:
    handler: src/core/their/handler.api
    package:
      include:
        - '!**'
        - 'src/core/their/**'

I don't have to do this with serverless-webpack.

from serverless-esbuild.

yeukfei02 avatar yeukfei02 commented on May 20, 2024 1

@floydspace

I think this issue is something related to my issue:

#86

from serverless-esbuild.

olup avatar olup commented on May 20, 2024 1

@dashmug and @PatrykMilewski I have added a PR to optimize individual packaging: #87
I'd love to have your input on this ; if this is working with your repo, use cases, etc... Could you give it a try ?

from serverless-esbuild.

floydspace avatar floydspace commented on May 20, 2024 1

🎉 This issue has been resolved in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from serverless-esbuild.

floydspace avatar floydspace commented on May 20, 2024

Hey @PatrykMilewski, thank you for using the plugin.
Indeed, I was able to reproduce. It's handled, but halfway. so it does not work properly now.
Will work on the fix as soon as I have time.

from serverless-esbuild.

PatrykMilewski avatar PatrykMilewski commented on May 20, 2024

@floydspace Thanks! Could you share some more details? Maybe I could fix it myself and create a PR?

from serverless-esbuild.

floydspace avatar floydspace commented on May 20, 2024

@PatrykMilewski the issue is that serverless by default packs everything that is in the this.serverless.config.servicePath folder, I replace this folder to .build one as all compiled artifacts are stored there during the compilation. But seems like we have to prepare artifacts for each lambda manually, so compile, zip it, and provide the archive as lambda artifact. the implementation by serverless-webpack could work, see: packageModules.js#L73

from serverless-esbuild.

dashmug avatar dashmug commented on May 20, 2024

Thank you for this package @floydspace. I am experiencing the same problem with v1.6.0.

from serverless-esbuild.

PatrykMilewski avatar PatrykMilewski commented on May 20, 2024

@dashmug Should work, but it's kinda annoying and might cause problems, like you use some common files and then you forgot to include them.

Using serverless-webpack solves the problem? But then isn't it slowing down the whole build? It ruins all of the benefits of quick build of ESBuild, isn't it?

from serverless-esbuild.

dashmug avatar dashmug commented on May 20, 2024

@PatrykMilewski I'm only reporting my current workaround in the hopes that it can help someone. It is indeed annoying to have to exclude/include them explicitly. I didn't need to do that with my other project using serverless-webpack and I get optimised packages per function.

I'm hoping the same functionality can make its way here in serverless-esbuild as well.

from serverless-esbuild.

olup avatar olup commented on May 20, 2024

Hoping for this feature as well, any updates on it ?

from serverless-esbuild.

floydspace avatar floydspace commented on May 20, 2024

Sorry guys, don't have time to focus on this issue.
If you want to use serverless-webpack as workaround I would suggest you use it in pair with esbuild-loader, so you would have the same fast build benefit

from serverless-esbuild.

PatrykMilewski avatar PatrykMilewski commented on May 20, 2024

@dashmug and @PatrykMilewski I have added a PR to optimize individual packaging: #87
I'd love to have your input on this ; if this is working with your repo, use cases, etc... Could you give it a try ?

Sure! I will give it a try today or tomorrow, thank you!

from serverless-esbuild.

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.