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

swc compile command has hardcoded sourcemaps #9187

Closed
Tirke opened this issue Mar 4, 2022 · 1 comment · Fixed by #9198
Closed

swc compile command has hardcoded sourcemaps #9187

Tirke opened this issue Mar 4, 2022 · 1 comment · Fixed by #9198
Assignees

Comments

@Tirke
Copy link

Tirke commented Mar 4, 2022

👋

Current Behavior

let swcCmd = `npx swc ${srcPath} -d ${destPath} --source-maps --no-swcrc --config-file=${swcrcPath}`;

--source-maps is hardcoded so adding "sourceMaps": false, to your .swcrc has no effect.
Is there any reason why this parameter is hardcoded?

Expected Behavior

I should be able to disable sourcemaps on swc compiles.

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 17.5.0
   OS   : darwin arm64
   pnpm : 6.31.0

   nx : 13.8.4
   @nrwl/angular : undefined
   @nrwl/cli : 13.8.4
   @nrwl/cypress : undefined
   @nrwl/detox : undefined
   @nrwl/devkit : 13.8.4
   @nrwl/eslint-plugin-nx : 13.8.4
   @nrwl/express : undefined
   @nrwl/jest : 13.8.4
   @nrwl/js : 13.8.4
   @nrwl/linter : 13.8.4
   @nrwl/nest : undefined
   @nrwl/next : undefined
   @nrwl/node : undefined
   @nrwl/nx-cloud : 13.1.6
   @nrwl/react : undefined
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : undefined
   @nrwl/tao : 13.8.4
   @nrwl/web : undefined
   @nrwl/workspace : 13.8.4
   typescript : 4.6.2
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:
Tirke added a commit to Tirke/nx that referenced this issue Mar 4, 2022
nartc pushed a commit that referenced this issue Mar 4, 2022
nartc added a commit that referenced this issue Mar 7, 2022
…crc needed (with migrations) (#9198)

* fix(js): remove hardcoded source-maps and add default value to sourceMaps in swcrc

ISSUES CLOSED: #9187

* fix(js): rename .swcrc to .lib.swcrc (with migrations)

* fix(js): revert jest config js tmpl in jest generator and replace jest config manually in JS generator

* chore(js): update snapshot

Co-authored-by: Chau Tran <ctran@Chaus-MacBook-Pro.local>
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.