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

Unable to fix 'unsafe-eval' problem on Manifest V3 #9

Open
inakineitor opened this issue Jul 2, 2021 · 1 comment
Open

Unable to fix 'unsafe-eval' problem on Manifest V3 #9

inakineitor opened this issue Jul 2, 2021 · 1 comment

Comments

@inakineitor
Copy link

Hello! First of all, thank you for making such a useful tool!

I was previously using a create-react-app boilerplate modified to create an extension and everything worked find but took to much time to compile and worked with MV2, not 3.

I decided to change to Vite (and use this plugin) to increase the compile speed and to allow for the use of the --watch flag in the future. Configuring everything went well, and I was able to render empty options and popup pages successfully. The problem arose when I started to bring all the components back from my previous repo to the vite one.

Everything was displaying correctly until one of the components caused this error on the popup screen:
image

This made the screen not render anything JS related, effectively leaving the popup empty.

Manifest V3 doesn't allow for the content policy to be set to allow 'unsafe-eval' of popup scripts, so I am looking for an alternative solution. The create-react-app project didn't require the content policy to be changed from the default though, so I believe that is not the only solution.

I look forward to any insight that you may provide and will gladly provide any relevant information I missed. :)

@Half-A-Turnip
Copy link

@inakineitor maybe webpack "devtool: false"

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

No branches or pull requests

2 participants