egoist / rollup-plugin-esbuild

Use ESBuild with Rollup to transform ESNext and TypeScript code.
MIT License
628 stars 40 forks source link

sourceMaps option is always false while making call to getRenderChunk #333

Closed surgicaI closed 2 years ago

surgicaI commented 2 years ago

In following code the sourceMap option passed to getRenderChunk function will always be false:

  let sourceMap = false
  return {
    name: 'esbuild-minify',

    outputOptions({ sourcemap }) {
      sourceMap = options.sourceMap ?? !!sourcemap
      return null
    },

    renderChunk: getRenderChunk({
      minify: true,
      ...options,
      sourceMap,
    }),
  }
} 

Changing the order of properties would fix the issue

renderChunk: getRenderChunk({
      minify: true,
      sourceMap,
      ...options,
}),
github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 4.10.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: