Skip to content

Clarify what globs are matched against #406

Open
@mjomble

Description

@mjomble

Here's the current documentation for sourcemaps.assets:

A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.

If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.

The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)

Use the debug option to print information about which files end up being uploaded.

My first question whenever I see an option like this is - what exactly is the glob pattern matched against?

  • The source map file or the js/css/etc file itself?
  • The full absolute path or a relative path?
    • If a relative path, then relative to which dir?

And it always takes several rounds of trial and error until I figure out the answer.

The debug option is a nice touch and something I often look for in other tools when I find a similarly vague file pattern option.
However, when I tried it, it didn't really show much more information than when I ran it without the option, at least regarding asset matching.

You could greatly boost the developer experience of using these plugins by adding some concrete examples, e.g. "if you're running the plugin in dir X and your assets are X/Y/Z.js and X/Y/Z.js.map, then you should use this exact glob"

PS. Thanks for Sentry, it's awesome! ❤️

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions