Skip to content

Conversation

@pirxpilot
Copy link
Contributor

In some cases when common-shakekify is used browserify generates source maps in which some of the file base names are replaced with input.js

transform-ast default file name for source maps is input.js and before this change we didn't pass inputFilename option to transformAst function.

This change seems to help (source maps have real names of the files) although I am not sure exactly why this error does not show up in the tests or example.

pass inputFilename option to `transformAst`
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find, thanks!

@goto-bus-stop goto-bus-stop merged commit 446ce81 into browserify:master Aug 21, 2018
@goto-bus-stop
Copy link
Member

📦 0.5.1

pirxpilot added a commit to pirxpilot/brfs that referenced this pull request Aug 21, 2018
Pass `inputFilename` to static module to make it insert proper file name
into generated source map.
Without this change we end up with 'input.js' (which is the default file name) as
the basename of affected files in the resulting source maps.

see also: browserify/common-shakeify#16
pirxpilot added a commit to pirxpilot/brfs that referenced this pull request Aug 21, 2018
Pass `inputFilename` to static module to make it insert proper file name
into generated source map.
Without this change we end up with 'input.js' (which is the default file name) as
the basename of affected files in the resulting source maps.

see also: browserify/common-shakeify#16
@pirxpilot pirxpilot deleted the fix-sourcemap-filename branch August 22, 2018 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants