Skip to content

[Bug]: v1.0.4 generates wrong source maps in development #7870

@francesco-caveglia-deltatre

Description

System Info

System:
OS: Windows 11 10.0.22631
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 18.35 GB / 31.69 GB
Binaries:
Node: 20.14.0 - ~\AppData\Local\Volta\tools\image\node\20.14.0\node.EXE
Yarn: 3.6.1 - ~\AppData\Local\Volta\tools\image\yarn\3.6.1\bin\yarn.CMD
npm: 10.7.0 - ~\AppData\Local\Volta\tools\image\node\20.14.0\npm.CMD
pnpm: 9.10.0 - ~\AppData\Local\Volta\bin\pnpm.EXE
bun: 1.1.24 - ~.bun\bin\bun.EXE
Browsers:
Edge: Chromium (127.0.2651.98)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rspack/core: ^1.0.4 => 1.0.4

Details

Since @rspack/core@1.0.4 broken sourceMaps are created

Similar bug as #7535

output:
image

Reproduce link

No response

Reproduce Steps

  1. create project with pnpm create rsbuild@latest
  • pnpm run dev
  • broken source maps
  1. create project with pnpm create rsbuild@1.0.1 or downgrade to @rsbuild/core@1.0.1 and @rspack/core@1.0.3
  • pnpm run dev
  • works

enabling source-map in config works in build mode but not in dev

import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';

export default defineConfig({
  output: {
    sourceMap: {
      js: 'source-map',
    }
  },
  // OR
  // tools: {
  //   rspack: {
  //     devtool: 'source-map',
  //   },
  // },
  plugins: [pluginReact()],
});

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions