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

[set-webpack-public-path-plugin] Add a second plugin that uses the document.currentScript API. #4480

Merged
merged 5 commits into from
Jan 18, 2024

Conversation

iclanton
Copy link
Member

Summary

Adds a second plugin to this package that wraps the bundle in an IIFE to record the document.currentScript property before the factory function is called and then use that variable to set the __webpack_public_path__ variable.

How it was tested

Tested in a large monorepo.

Impacted documentation

The second mode needs to be documented.

Copy link
Contributor

@dmichon-msft dmichon-msft left a comment

Choose a reason for hiding this comment

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

Few minor suggestions.

@iclanton iclanton enabled auto-merge January 18, 2024 01:45
@iclanton iclanton disabled auto-merge January 18, 2024 01:46
@iclanton iclanton requested a review from patmill as a code owner January 18, 2024 02:29
@iclanton iclanton enabled auto-merge January 18, 2024 02:37
@iclanton iclanton force-pushed the currentScript-approach branch from 7bff259 to 9bd6284 Compare January 18, 2024 02:40
@iclanton iclanton force-pushed the currentScript-approach branch from 9bd6284 to a7238bb Compare January 18, 2024 03:06
@iclanton iclanton merged commit fb3c2e6 into microsoft:main Jan 18, 2024
5 checks passed
@iclanton iclanton deleted the currentScript-approach branch January 18, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants