File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,17 @@ module.exports = (api, options) => {
7878 jsonContent . description = packageJson . description
7979 }
8080
81+ jsonContent . content_security_policy =
82+ jsonContent . content_security_policy || "script-src 'self' 'unsafe-eval'; object-src 'self'"
83+
8184 // If building for production (going to web store) abort early.
8285 // The browser extension store will hash your signing key and apply CSP policies.
8386 if ( isProduction ) {
87+ jsonContent . content_security_policy = jsonContent . content_security_policy . replace ( / ' u n s a f e - e v a l ' / , '' )
88+
8489 return getManifestJsonString ( pluginOptions , jsonContent )
8590 }
8691
87- jsonContent . content_security_policy =
88- jsonContent . content_security_policy || "script-src 'self' 'unsafe-eval'; object-src 'self'"
89-
9092 if ( hasKeyFile ) {
9193 try {
9294 jsonContent . key = await hashKey ( keyFile )
You can’t perform that action at this time.
0 commit comments