Giter Club home page Giter Club logo

Comments (15)

lforst avatar lforst commented on May 29, 2024 1

We thought about adding this before in the webpack plugin we already had. For now, we consider this a bit out of scope as you can just delete source maps yourself after your build is complete and there is always the challenge for the Sentry plugin to know which files to delete - is it just the ones that the plugin uploaded or also the rest? Just some things to consider.

I will leave this issue open as it is a valid feature to think about.

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on May 29, 2024 1

@filiptammergard I hope I don't forget :D

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on May 29, 2024 1

@filiptammergard Docs are on the npm page of the plugin you're using. The globs are relative to cwd by default.

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on May 29, 2024 1

I just use @sentry/nextjs and a simple next build command then can't I still do this? I checked the plugin sentry-webpack-plugin too: getsentry/sentry-webpack-plugin#options

@meotimdihia The Next.js SDK is unrelated to this repository. The link you shared is correct - the Next.js SDK uses the v1 version of the Webpack plugin. However, In 99% of the cases you shouldn't have to mess with the webpack plugin options when using the Next.js SDK. deleteFilesAfterUpload is new and not supported in the Next.js SDK yet.

from sentry-javascript-bundler-plugins.

wtachau avatar wtachau commented on May 29, 2024

Here's what I ended up doing to delete sourcemaps after uploading (in the build script):

find <output dir> -type f -name '*.js.map' -delete
find <output dir> -type f -name '*.css.map' -delete
find <output dir> -type f -name '*.js' -exec sed -i -E 's/sourceMappingURL=[^ ]*\.js\.map//g' {} +
find <output dir> -type f -name '*.css' -exec sed -i -E 's/sourceMappingURL=[^ ]*\.css\.map//g' {} +

from sentry-javascript-bundler-plugins.

kricsleo avatar kricsleo commented on May 29, 2024

Deleting sourcemaps also means a lot to me. I prefer to delete all of them before deployment. If someone wants to keep them, they can disable this config and do the job as they want. But in most cases, deleting all sourcemaps would be a more common use case.

from sentry-javascript-bundler-plugins.

github-actions avatar github-actions commented on May 29, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox πŸ₯€

from sentry-javascript-bundler-plugins.

filiptammergard avatar filiptammergard commented on May 29, 2024

Nice @lforst! Can you please announce here when deleteFilesAfterUpload is available to use, and how to use it?

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on May 29, 2024

We released this in the newest version of the plugin! :)

from sentry-javascript-bundler-plugins.

filiptammergard avatar filiptammergard commented on May 29, 2024

@lforst Nice! Any documentation on how to you it? Is the glob relative to project root or relative to built folder?

from sentry-javascript-bundler-plugins.

maccman avatar maccman commented on May 29, 2024

@lforst where are the docs? Sorry - been searching for them for a bit - can't find them.

from sentry-javascript-bundler-plugins.

filiptammergard avatar filiptammergard commented on May 29, 2024

@lforst where are the docs? Sorry - been searching for them for a bit - can't find them.

As @lforst said you can find the docs on NPM for the plugin you're using. For example here: https://www.npmjs.com/package/@sentry/vite-plugin

from sentry-javascript-bundler-plugins.

meotimdihia avatar meotimdihia commented on May 29, 2024

@filiptammergard I can't find it too:

image

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on May 29, 2024

@meotimdihia These are the SDK docs. The plugin docs are located here npmjs.com/package/@sentry/vite-plugin

from sentry-javascript-bundler-plugins.

meotimdihia avatar meotimdihia commented on May 29, 2024

@lforst I just use @sentry/nextjs and a simple next build command then can't I still do this?
I checked the plugin sentry-webpack-plugin too: https://github.com/getsentry/sentry-webpack-plugin#options

from sentry-javascript-bundler-plugins.

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.