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

source map not work #21

Closed
billowz opened this issue Jun 18, 2019 · 3 comments
Closed

source map not work #21

billowz opened this issue Jun 18, 2019 · 3 comments
Labels

Comments

@billowz
Copy link

billowz commented Jun 18, 2019

Expected Behavior

Current Behavior

  1. isbanbul plugin print error on configuring the source map
TypeError: instrumenter.lastSourceMap(...).toJSON is not a function
    at Object.transform (/test/node_modules/rollup-plugin-istanbul/dist/rollup-plugin-istanbul.cjs.js:30:58)
    at Promise.resolve.then (/test/node_modules/rollup/dist/rollup.js:15344:25)
  1. the souceMap option not work, need to config instrumenterConfig.produceSourceMap

Steps to Reproduce

  • isbanbul plugin plugin configuration
istanbul({
	exclude: ['test/*'],
	sourceMap: true,
	instrumenterConfig: {
		produceSourceMap: true
	}
})

Context (Environment)

Windows 10, node v10.15.3

Possible Implementation

  1. instrumenter.lastSourceMap returns (null | Object) the source map object.
  2. set instrumenterConfig.produceSourceMap on ops.sourceMap enabled
billowz added a commit to billowz/rollup-plugin-istanbul that referenced this issue Jul 8, 2019
@billowz
Copy link
Author

billowz commented Jul 12, 2019

see rollup/rollup#2983, the istanbul-lib-instrument require the inputSourceMap to maps the not instrumented code back to it's original form

@tommck
Copy link

tommck commented Feb 6, 2020

It seems that this was fixed rollup/rollup#2993

Is this support added here yet?

@artberri artberri added the bug label Dec 22, 2020
@artberri
Copy link
Owner

The new version 3.0.0 that I've already published in the npm registry should fix the bug.

Thank you for the report.

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

Successfully merging a pull request may close this issue.

3 participants