Skip to content

Commit

Permalink
fix: permissions polyfill firefox & wkwebview
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox authored and Jack-Works committed Oct 10, 2019
1 parent c88f236 commit 644d819
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config-overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const target = (argv => ({
function override(config, env) {
if (target.Firefox) {
polyfills = polyfills.filter(name => !name.includes('webextension-polyfill'))
polyfills.push('src/polyfill/permissions.js')
}
if (target.StandaloneGeckoView || target.WKWebview) polyfills.push('src/polyfill/permissions.js')

// CSP bans eval
// And non-inline source-map not working
Expand Down Expand Up @@ -108,7 +108,7 @@ function override(config, env) {
if (target.Firefox) {
templateContent = templateContent.replace(
'<script src="/polyfill/browser-polyfill.min.js"></script>',
'<script src="/polyfill/permissions.js"></script>',
target.StandaloneGeckoView ? '<script src="/polyfill/permissions.js"></script>' : '',
)
}
return new HtmlWebpackPlugin({
Expand Down

0 comments on commit 644d819

Please sign in to comment.