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

[Bug Fix]: Updating webview CSP + webpack sourcemapping overrides #423

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

mliao95
Copy link

@mliao95 mliao95 commented Jun 22, 2021

This PR updates the content-src CSP to allow URLs with data: prefixes. It also updates webpack sourcemapping to account for webpack:// resource prefixes.

These changes should help improve compatibility of the extension with projects using webpack.

@mliao95 mliao95 requested a review from bgoddar June 22, 2021 18:51
Copy link
Contributor

@bgoddar bgoddar left a comment

Choose a reason for hiding this comment

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

Looks like there are also places in sourcemaps.md and utils.ts that need updating:

export const SETTINGS_DEFAULT_PATH_OVERRIDES: IStringDictionary<string> = {
    'meteor://💻app/*': '${webRoot}/*',
    'webpack:///*': '*',
    'webpack:///./*': '${webRoot}/*',
    'webpack:///./~/*': '${webRoot}/node_modules/*',
    'webpack:///src/*': '${webRoot}/*',
};

and sourcempas.md

"sourceMapPathOverrides": {
    "webpack:///./~/*": "${webRoot}/node_modules/*",
    "webpack:///./*": "${webRoot}/*",
    "webpack:///*": "*",
    "webpack:///src/*": "${webRoot}/*",
    "meteor://💻app/*": "${webRoot}/*"
}

@mliao95 mliao95 requested a review from bgoddar June 22, 2021 19:18
Copy link
Contributor

@bgoddar bgoddar left a comment

Choose a reason for hiding this comment

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

LGTM!

@mliao95 mliao95 merged commit 0cd076d into master Jun 22, 2021
@vidorteg vidorteg deleted the user/milia/sourcemap-override branch January 30, 2024 03:36
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