For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/packages/rspeedy/interfaces/SourceMap.md.
Lynx
  • English
  • Interface: SourceMap

    The SourceMap configures whether and how to generate source-map for outputs.

    Properties

    css?

    optional css?: boolean

    Whether to generate CSS source maps.

    Default Value

    true in Lynx environments, false otherwise.

    Remarks

    Lynx environments enable CSS source maps so that CSS diagnostics can be mapped back to the source; all .map assets are removed before emit.

    Example

    Disable CSS sourcemap.

    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        sourceMap: {
          css: false,
        },
      },
    })

    js?

    optional js?: DevTool

    How the source map should be generated. Setting it to false will disable the source map.

    Default Value

    When output.sourceMap is an object and js is unset, it defaults to 'cheap-module-source-map' in development. In production, it defaults to 'source-map' for Lynx environments and false otherwise.

    Remarks

    See Rspack - Devtool for details.

    Examples

    • Enable high-quality source-maps for production:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        sourceMap: {
          js: process.env['NODE_ENV'] === 'production'
            ? 'source-map'
            : 'cheap-module-source-map',
        },
      },
    })
    • Disable source-map generation:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        sourceMap: {
          js: false,
        },
      },
    })
    • Use high-quality source-maps for all environments:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        sourceMap: {
          js: 'source-map',
        },
      },
    })
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.