Skip to content

Uncaught ReferenceError: _typeof is not defined #8574

Closed
@camertron

Description

@camertron

mapbox-gl-js version: 1.1.1

browser: Brave (Chromium 75.0.3770.100), Firefox 68.0.1

Steps to Trigger Behavior

webpack ^4.37.0
@babel/core: ^7.5.5
@babel/plugin-proposal-class-properties: ^7.5.5
@babel/plugin-proposal-export-default-from: ^7.5.2
@babel/plugin-proposal-object-rest-spread: ^7.5.5
@babel/plugin-syntax-dynamic-import: ^7.2.0
@babel/plugin-transform-shorthand-properties: ^7.2.0
@babel/preset-env: ^7.5.5
@babel/preset-react: ^7.0.0

.babelrc:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "modules": false,
        "targets": {
          "browsers": ["> 5%", "last 2 versions", "ie 11"]
        },
        "forceAllTransforms": false,
        "loose": true,
        "exclude": ["transform-typeof-symbol"],
        "useBuiltIns": "usage",
        "corejs": 3
      }
    ],
    "@babel/preset-react"
  ],
  "env": {
    "test": {
      "presets": [["@babel/preset-env"], "@babel/preset-react"],
      "plugins": [
        [
          "@babel/proposal-class-properties",
          {
            "spec": true
          }
        ]
      ]
    }
  },
  "plugins": [
    "@babel/plugin-syntax-dynamic-import",
    "@babel/proposal-object-rest-spread",
    "@babel/transform-shorthand-properties",
    "@babel/proposal-class-properties",
    "@babel/plugin-proposal-export-default-from"
  ]
}

Link to Demonstration

Expected Behavior

I expect the map to load.

Actual Behavior

Console contains 4 errors that say "Uncaught ReferenceError: _typeof is not defined"

I have googled around for answers and have found several issues filed against this repo with identical symptoms. I've tried all the solutions with absolutely no success. Any ideas? I'm at my absolute wit's end.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions