Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"(!) Broken sourcemap" when enabling rollup sourcemaps #30019

Open
1 of 4 tasks
ThePlenkov opened this issue Feb 13, 2025 · 0 comments
Open
1 of 4 tasks

"(!) Broken sourcemap" when enabling rollup sourcemaps #30019

ThePlenkov opened this issue Feb 13, 2025 · 0 comments

Comments

@ThePlenkov
Copy link
Contributor

Current Behavior

Hi!

I want to use sourcemaps with rollup and enabled them like this in rollup config:

withNx({
  main: './src/index.ts',
  outputPath: './dist',
  tsConfig: './tsconfig.lib.json',
  compiler: 'swc',
  format: ['esm'],
  sourceMap: true,
});

When I build I have a following message

rollup v4.34.6
bundles /workspaces/codygen/packages/codygen/src/index.ts → dist...
  index.esm.js 8.112 KB
(!) Broken sourcemap
https://rollupjs.org/troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect
Plugins that transform code (such as "nx-swc") should generate accompanying sourcemaps.
created dist in 1.5s

[2025-02-13 12:32:51] waiting for changes...

Do you know why? Is it a bug? Thanks!

Expected Behavior

Well I assume rollup should not give such a warning. I guess something went wrong.

GitHub Repo

No response

Steps to Reproduce

  1. Clone https://github.com/theplenkov-npm/codygen/tree/main
  2. npm install
  3. npx nx build codygen

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.12.0
OS             : linux-x64
Native Target  : x86_64-linux
npm            : 10.9.0

nx                 : 20.4.2
@nx/js             : 20.4.2
@nx/eslint         : 20.4.2
@nx/workspace      : 20.4.2
@nx/devkit         : 20.4.2
@nx/eslint-plugin  : 20.4.2
@nx/rollup         : 20.4.2
@nx/vite           : 20.4.2
@nx/web            : 20.4.2
typescript         : 5.7.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/rollup/plugin
@nx/eslint/plugin
@nx/vite/plugin

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant