-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update sourcemapPathTransform to also take the path to the sourcemap … #3617
Changes from 3 commits
c1a5b6a
aac8984
2a363fb
f37f04b
eb68d5a
075cc40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
description: | ||
'pass the file path to sourcemapPathTransform', | ||
options: { | ||
output: { | ||
name: 'myModule', | ||
sourcemap: true, | ||
file: path.resolve(__dirname, 'main.js'), | ||
sourcemapPathTransform: (relativePath, sourcemapPath) => path.resolve(path.dirname(sourcemapPath), relativePath) | ||
} | ||
}, | ||
generateError: { | ||
code: 'VALIDATION_ERROR', | ||
message: 'sourcemapPathTransform function must return a string.' | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this section is wrong but I didn't find a way to assert about the sourcemap output or even just the js output... pointers here would be helpful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you just extend this one to use the new parameter: https://github.com/rollup/rollup/tree/master/test/sourcemaps/samples/transform-source-paths ? Alternatively, you can put a modified one next to it. |
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 42; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a short explanation of what
sourcePath
is as opposed tosourcemapPath
here would help avoid a lot of confusion.