Using NextJS for Chrome extensions
Unanswered
Giant Chinchilla posted this in #help-forum
Giant ChinchillaOP
Hi, as the title says I chose to use next for a chrome extension. I'm running into CSP issues, mainly that next is generating inline scripts? I'm using output: "export", but it still seems to be adding inline scripts. Heres the relevant error message.
and the code in which it is happening at note this is converted to extension.html in my output :
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-Q+8tPsjVtiDsjF/Cv8FMOpg2Yg91oKFKDAJat1PPb2g='), or a nonce ('nonce-...') is required to enable inline execution.and the code in which it is happening at note this is converted to extension.html in my output :
const Extension = () => {
return (
<div className="w-96 h-96 bg-slate-50 flex justify-center items-center p-2">
<a className="text-5xl" href="index.html">Click me to go home !</a>
</div>
)
}
export default Extension1 Reply
Gharial
Same