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

Spack doesn't include sourcemaps #1438

Closed
Nerixyz opened this issue Feb 28, 2021 · 1 comment
Closed

Spack doesn't include sourcemaps #1438

Nerixyz opened this issue Feb 28, 2021 · 1 comment
Labels

Comments

@Nerixyz
Copy link

Nerixyz commented Feb 28, 2021

Describe the bug
When bundling with sourceMaps enabled, spack does't emit sourcemaps.

Input code

function add(...args: number[]): number {
  return args.reduce((acc, v) => acc + v, 0);
}

console.log(add(1,2,3,4));

Config

/** @type {import('@swc/core/spack').BundleOptions} */
module.exports = {
  entry: 'src/index.ts',
  output: {
    name: 'bundle.js',
    path: 'dist'
  },
  options: {
    jsc: {
      parser: {
        syntax: 'typescript'
      }
    },
    sourceMaps: true
  }
}

Expected behavior

Spack should emit sourcemaps

Version
The version of @swc/core: 1.2.46

Additional context
I also noticed, spack doesn't take the output.name into consideration.

@Nerixyz Nerixyz added the C-bug label Feb 28, 2021
@kdy1 kdy1 added this to the v1.2.52 milestone Mar 28, 2021
@kdy1 kdy1 modified the milestones: v1.2.52, v1.2.53, v1.2.54 Apr 10, 2021
@kdy1 kdy1 removed this from the v1.2.54 milestone Apr 19, 2021
kdy1 added a commit to kdy1/swc that referenced this issue Apr 19, 2021
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 24, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants