Skip to content

Unified behaviour for configuring source map generation #1049

@Lms24

Description

@Lms24

Some of our wizards today actively enable source map generation (e.g. Angular). Some others don't do anything but let the meta framework SDK's build plugin take care of setting hidden as a default (e.g NextJS). This however, misses the case where users actively disabled sourceMap settings, in which case our plugins also don't enable it (i.e. respect users' decisions but warn about it).

We should adjust our wizards to do the following:

  • if no specific source map settings are found:
    • do nothing, if we can override source maps generation at build time
    • enable source maps (ideally to 'hidden', true otherwise) if we can't override at build time
  • if source maps generation is disabled (e.g. sourceMap: false), ask if users want to enable it
    • set to 'hidden' (or true if hidden does not apply).
    • set filesToDeleteAfterUpload to a generic glob that matches on all .js.map files

Today's behaviour:

  • Angular: Always enable with true, even if users disabled it beforehand
  • NextJS:
    • does nothing, let's build time handle it
    • (exception: widenClientFileUpload: true)
  • Nuxt:
  • SvelteKit: Does nothing, defers to build time plugin
  • Remix:
    • For Vite: Enables source map generation in Vite config (true), instructs true as fallback
    • For CLI (pre-Vite): Enables source map generation via --sourcemap CLI arg
  • Sourcemaps
    • Either actively modifies code to true
    • Or instructs users to set true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions