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

Dynamically generate manifest.json #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scrool
Copy link
Contributor

@scrool scrool commented Oct 25, 2020

Make it possible to create it based on mode and locally define server.

@scrool scrool force-pushed the manifest branch 2 times, most recently from 27b9b8e to 9e63734 Compare October 25, 2020 18:32
@scrool scrool changed the title Dynamically generate manifest.json WIP: Dynamically generate manifest.json Oct 25, 2020
@seandlg seandlg self-requested a review October 26, 2020 14:14
@seandlg seandlg added the enhancement New feature or request label Oct 26, 2020
@seandlg
Copy link
Collaborator

seandlg commented Oct 27, 2020

Manually pulled this into v2. Thanks for the commit!

Configures `copy-webpack-plugin` to transform `manifest.json` on copy.
To parse, update and generate `content_security_policy` uses
`csp-generator`.

If mode is `staging` or `development` updates `content_security_policy`
entries of `manifest.json` for `vue-remote-devtools`.
Primarily this makes it possible to easily redefine server that was
hardcoded in `Vue-IFrame.ts` and `manifest.json`.

As a side effect it is now possible to define `content_security_policy`
based on mode. Production builds no longer include URL to staging
server.
@scrool scrool changed the title WIP: Dynamically generate manifest.json Dynamically generate manifest.json Oct 28, 2020
@scrool
Copy link
Contributor Author

scrool commented Oct 28, 2020

Originally I have used vue-cli-plugin-browser-extension. But that turned out to do other stuff that might be still useful I was not able to make it working with the rest of the plugins used by the extension.

So I went with my primary goal to update manifest.json. csp-generator is MIT licensed and fairly low profile from the dependency point of view. While code to manipulate content security policy is fairly simple the advantage of using it are existing tests.

It seems to be working well now so I have removed WIP prefix from the pull request.

@scrool
Copy link
Contributor Author

scrool commented Oct 28, 2020

Manually pulled this into v2. Thanks for the commit!

Only now I have noticed your comment. What would you like to do with this pull request - drop it in favor of v2?

@seandlg
Copy link
Collaborator

seandlg commented Oct 28, 2020

I think it's a sensible addition. I git-cherry-picked the commit, so should be in v2. Will double check tomorrow that everything is included.

Edit: just seeing more additions, will look into it tomorrow and pull it into v2. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants