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

fix: do not add js extension for eval source maps #17331

Merged
merged 1 commit into from
Jun 7, 2023

fix: do not add `js` extension for eval source maps

aa27d49
Select commit
Loading
Failed to load commit list.
Merged

fix: do not add js extension for eval source maps #17331

fix: do not add `js` extension for eval source maps
aa27d49
Select commit
Loading
Failed to load commit list.
Deleted GitHub App / Copilot for PRs succeeded Jun 5, 2023 in 12s

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 to undefined.js for non-numeric module ids (link)

  • Add and modify webpack configurations for eval-nosources-source-map and eval-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 using eval-nosources-source-map and eval-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 go
  • copilot:summary: a one paragraph summary of the code changes
  • copilot:walkthrough: a step by step walkthrough of the code changes
  • copilot: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

Progress:

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