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

sourcemaps not working #33

Closed
AlbertoElias opened this issue Jan 12, 2018 · 4 comments
Closed

sourcemaps not working #33

AlbertoElias opened this issue Jan 12, 2018 · 4 comments

Comments

@AlbertoElias
Copy link

AlbertoElias commented Jan 12, 2018

Using the latest versions, sourcemaps have stopped working. I updated my karma config with no success.

I'm using these versions:

"karma": "^2.0.0",
"karma-rollup-preprocessor": "^5.0.0",
"rollup": "^0.54.0"

And this config:

rollupPreprocessor: {
	plugins: [...listOfPlugins],
	output: {
		sourcemap: 'inline'
	},
	format: 'iife',
	name: 'projectname'
}

Any suggestions?

@jlmakes
Copy link
Owner

jlmakes commented Jan 16, 2018

Well, Rollup moved opts.sourcemap to opts.output.sourcemap in a recent release, but that was gently patched in 5.1.1. Still, it should work without the patch, you'll just get deprecation warnings.

I'm not sure what would cause source maps to stop being generated, but a simple repository demonstrating the issue would help.

Edit: I've just tested rollup@0.54 and karma-rollup-preprocessor@5.1.1 on a small project, and the source maps are being generated and coming through fine.

It's also worth nothing that both format and name have moved inside of output, so your config without deprecation warnings would look like this:

rollupPreprocessor: {
	plugins: [...listOfPlugins],
	output: {
		sourcemap: 'inline'
		name: 'projectname',
		format: 'iife'
	}
}

If you can put together a fresh repo that reproduces your issue, I'll attack the problem, otherwise I'm not sure what to suggest. Sorry @AlbertoElias!

@AlbertoElias
Copy link
Author

AlbertoElias commented Jan 17, 2018

Ok, I don't have the code up just yet, but will do in 1-2 weeks. Do you mind if we leave this issue open until then? Thanks a lot for your help!

@jlmakes
Copy link
Owner

jlmakes commented Jan 17, 2018

That is fine, but please make sure the reproduction is a new repo, with only the code necessary to clearly reproduce the issue.

@jlmakes jlmakes closed this as completed Jan 30, 2018
@Lalem001
Copy link
Contributor

I have encountered this issue as well. So here is a repo that reproduces the issue:

https://github.com/Lalem001/karma-rollup-preprocessor-issue

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

3 participants