question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any way to deploy source maps to Sentry, and not package them in the serverless ZIP files?

See original GitHub issue

Hi, I just started using this plugin today, and I’m super impressed! With serverless-webpack, my API (37 Lambda functions) took 12 minutes to build & deploy. Now, with serverless-esbuild, it takes about 2 minutes. 😏

The only thing missing for me, is that I was relying on the Sentry Webpack plugin to automatically push my source maps to Sentry. With esbuild, is there some way I can have it dump my .map files to a folder, separately from the CloudFormation deployment, and then upload those to Sentry? Even if I have to use their CLI tool to upload the source maps, that’s fine. I just need some way to hook into the build process and execute a process to do this.

Thanks!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

8reactions
simonccommented, Sep 28, 2021

For anyone new to esbuild and finding this page, @ffxsam’s code works but you need to specify write: false in the options for args.outputFiles to be present.

# serverless.yml
custom:
  esbuild:
    plugins: plugins.js # file that contains the sourcemap-upload code
    sourcemap: external # using 'external' here as we only need the map files
    write: false
2reactions
olupcommented, Jun 15, 2021

Or you could leave the source map where they are and feed the path to sentry cli. In any case, you should open a repo. I am sure many teams would be happy to have such a plugin for esbuild (in a serverless-esbuild project or other). Should we close this issue as it is not specifically linked to serverless-esbuild ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging
Packaging. Package CLI Command. Using the Serverless CLI tool, you can package your project without deploying it to AWS. This is best used...
Read more >
Fix Sentry sourcemaps for AWS Lambda functions
1. Configure webpack to generate sourcemaps ; 1, const slsw = require('serverless-webpack'); ; 2 ; 3, module.exports = { ; 4, devtool: slsw.lib....
Read more >
serverless-sentry | Yarn - Package Manager
This Serverless plugin simplifies the integration of Sentry](https://sentry.io) with the popular Serverless Framework and AWS Lambda.
Read more >
Deploying a Node.js App with AWS Elastic Beanstalk
First, we need to zip our project files so that they can be uploaded all at once. Navigate to your project directory, select...
Read more >
[AWS Lambda] Optimizing node_modules in zip files
Using a layer - zip the node_modules into a layer · Bundling all the required dependencies · Run install using production flag (npm,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found