我在我的网站上有双击广告.当我用iPad(iOS版本9.3.5 Safari)打开网站时,我在控制台中看到以下错误:
Blocked a frame with origin "https://tpc.googlesyndication.com" from accessing a frame with origin "https://mywebsite.com". Protocols, domains, and ports must match.
Run Code Online (Sandbox Code Playgroud)
**用" https://mywebsite.com " 替换了我网站的网址
似乎这个错误被写入无限循环中的日志.正如您在屏幕截图中看到的那样,错误被打印到控制台122.6K次.
在Chrome中,我没有看到这些错误.
为什么会这样?我有什么办法可以解决这个问题吗?
非常感谢!
在我的 webpack 配置中,我创建了 2 个缓存组:“vendors”和“common”。
entry: {
'entry1': './src/entry1.js',
'entry2_independent': './src/entry2_independent.js',
},
optimization: {
splitChunks: {
cacheGroups: {
vendors: {
minChunks: 30,
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
priority: -10,
chunks: 'initial'
},
default: {
minChunks: 30,
priority: -20,
chunks: 'initial',
reuseExistingChunk: true,
name: 'common'
}
}
}
},
Run Code Online (Sandbox Code Playgroud)
我希望我的入口点之一是独立的。它应该包含所有依赖项,而不依赖于 common.js 或vendors.js。
更具体地说,我希望名称中带有“_independent”的所有入口点都是独立的。
我仍然想保留优化逻辑。如果一个模块使用了 30 个块,我仍然希望它成为“公共”层的一部分。
我该怎么做?
谢谢!