Comments (15)
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.
@filiptammergard I hope I don't forget :D
from sentry-javascript-bundler-plugins.
@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.
I just use
@sentry/nextjs
and a simplenext build
command then can't I still do this? I checked the pluginsentry-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.
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.
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.
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.
Nice @lforst! Can you please announce here when deleteFilesAfterUpload
is available to use, and how to use it?
from sentry-javascript-bundler-plugins.
We released this in the newest version of the plugin! :)
from sentry-javascript-bundler-plugins.
@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.
@lforst where are the docs? Sorry - been searching for them for a bit - can't find them.
from sentry-javascript-bundler-plugins.
@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.
@filiptammergard I can't find it too:
from sentry-javascript-bundler-plugins.
@meotimdihia These are the SDK docs. The plugin docs are located here npmjs.com/package/@sentry/vite-plugin
from sentry-javascript-bundler-plugins.
@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)
- error: release not found HOT 6
- sentry-vite + CDN sourcemaps not working HOT 30
- esbuild plugin's debug ID generation is not deterministic HOT 6
- Cannot read properties of undefined (reading "silent") HOT 2
- Should inject banner code after `use strict` HOT 1
- Sourcemap upload not working for `.mjs` files HOT 2
- esbuild plugin: You are attempting to use this endpoint too frequently HOT 4
- sentry-webpack-plugin + electron(-forge) breaks universal builds HOT 1
- Webpack plugin causes Typescript build errors when React component annotation is enabled HOT 1
- Add `bundlesizeOptimizations` options to docs
- Source map loaded and connected to release, but still don't see any readable trace HOT 4
- Webpack plugin uploads source maps on development mode HOT 2
- VSC Debugger doesn't stop at breakpoint in TypeScript (ts) file but in Vue file
- Verbose console print from [sentry-vite-plugin] HOT 6
- Too many source-maps cause rate-limiting from the sentry API HOT 8
- Source Maps aren't mapped when working with docker HOT 5
- vite-plugin uploads sourcemaps when building for development HOT 1
- Sourcemapping broken with vite 5.1.7 and 5.2.10 HOT 9
- Cannot read properties of undefined (reading 'sentry') when using reactComponentAnnotation with @react-three/fiber HOT 2
- `sourcemaps.rewriteSources` doesnβt apply new source value HOT 8
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 sentry-javascript-bundler-plugins.