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

feat(webpack): Add debug ID injection to the webpack plugin #198

Merged
merged 4 commits into from Apr 7, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 7, 2023

Ref: #191

Similar to #192, we now add debug ID injection to the Webpack plugin.

Note this needs tests. We will add them as a follow-up when we identified some quirks with the injection across all bundlers.

@@ -42,7 +42,8 @@
"find-up": "5.0.0",
"glob": "9.3.2",
"magic-string": "0.27.0",
"unplugin": "1.0.1"
"unplugin": "1.0.1",
"webpack-sources": "^3.2.3"
Copy link
Member

Choose a reason for hiding this comment

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

m: should we hard pin? Also this doesn't change yarn.lock?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point. Added. The yarn lock didn't change because unplugin itself depended on the exact same version.

return;
}

compilation.updateAsset(fileName, () => {
Copy link
Member

Choose a reason for hiding this comment

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

do we need to cache here? So we only inject once?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the cache inspired by webpack/webpack#15454

@lforst lforst mentioned this pull request Apr 7, 2023
@lforst lforst enabled auto-merge (squash) April 7, 2023 11:45
@lforst lforst merged commit f5db486 into main Apr 7, 2023
16 checks passed
@lforst lforst deleted the lforst-webpack-debug-id branch April 7, 2023 11:47
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.

None yet

2 participants