Closed machsix closed 4 years ago
Well that's a Firefox issue. Somehow the FF folks thought it would be a good idea to have global properties which are not part of the global object.
Symbol
is one of these in FF 52. That's why Tampermonkey misses this property.
You can workaround the issue by either adding
// @grant none
to your script or by adding
window.Symbol = Symbol;
as first line after the header.
Expected Behavior
Script runs normally like Chrome 48+Tampermonkey and produces the following content in the console
Actual Behavior
An error is generated for Firefox 52 ESR or Firefox 57 with Tampermonkey
The error is not reproducible in
core-js@2
but notcore-js@3
Specifications
Script
The script is generated with Webpack + @babel/plugin-transform-runtime + @babel/runtime-corejs3. If I use Webpack + @babel/plugin-transform-runtime + @babel/runtime-corejs2, everything works normally. I hosted the minimum example at
Entry point is
/src/index.js
The produced userscript is at
/dist/test.user.js