fix: do not add js
extension for eval source maps
#17331
Analysis complete
Summary
This pull request fixes a bug in the EvalSourceMapDevToolPlugin
that caused incorrect file names in source maps. It also adds and updates test cases for the eval-nosources-source-map
and eval-source-map
devtool options to verify the source map generation for different module id types, entry points, aliases, and TypeScript support.
Walkthrough
-
Fix bug where
sourceMap.file
was set toundefined.js
for non-numeric module ids (link) -
Add and modify webpack configurations for
eval-nosources-source-map
andeval-source-map
devtool options to test different scenarios with module ids, entry points, aliases, and TypeScript support (link, link) -
Add test cases to check that
sourceMap.file
matches the expected pattern for JavaScript and TypeScript files when usingeval-nosources-source-map
andeval-source-map
devtool options (link, link, link, link) -
Add test cases to check that
sourceMap.sourcesContent
is included or excluded depending on the devtool option (link, link, link) -
Add a dummy module to test dynamic dependencies with source map generation (link)
Poem
sourceMap
fixes
eval devtool variants
autumn tests abound
Emoji
🐛🧪🛠️
Include these descriptions in your pull request description by including the following marker tags:
copilot:all
: all the content, in one gocopilot:summary
: a one paragraph summary of the code changescopilot:walkthrough
: a step by step walkthrough of the code changescopilot:poem
: a poem about the code changes!copilot:emoji
: three emoji that capture the changes
Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here]
.
Details
Copilot for PRs is a limited technical preview from GitHub Next.
It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.
To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord
File | Status | Duration |
---|---|---|
Summary & Walkthrough | ✅ Finished | 31 seconds |
lib/EvalSourceMapDevToolPlugin.js | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-nosources-source-map/index.js | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-nosources-source-map/index.ts | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-nosources-source-map/webpack.config.js | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-source-map/index.js | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-source-map/index.ts | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-source-map/test.js | ✅ Finished | 23.6 seconds |
test/configCases/devtools/eval-source-map/webpack.config.js | ✅ Finished | 23.6 seconds |