When submitting browser extensions to the Google Play Store, you may encounter specific restrictions that can lead to rejection. This guide covers common issues and their solutions.
Google Play Store prohibits Manifest V3 extensions from loading remotely hosted code. A common violation occurs when your extension bundle includes code that loads external scripts, such as the AppleID script from https://appleid.cdn-apple.com/.
To resolve this issue, you can configure your bundler to replace remote script loaders with local dummy files. We provide solutions for both Vite and Webpack bundlers.
Configure Webpack to alias the remote loader to your dummy file:
Copy
Ask AI
// webpack.config.jsconst path = require('path');const webpack = require('webpack');module.exports = { // ... other config options resolve: { alias: { // Alias any imports containing loadAppleId to our local dummy file loadAppleId: path.resolve(__dirname, 'src/loadAppleId.js'), }, }, plugins: [ // ... other plugins // Add a plugin to replace any direct references to the Apple ID script URL new webpack.NormalModuleReplacementPlugin( /loadAppleId/, path.resolve(__dirname, 'src/loadAppleId.js') ), ],};