Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Minified Webpack JS Bundle causing Unexpected Token on Safari

I have a minified, bundled JS file using Webpack. The file is working on modern browsers, but when I get to Safari 12.1.2, it causes this error:

Unexpected token '='. Expected an opening '(' before a method's parameter list.

Here's the minified bit of code, where the error is being thrown at line 1:0

(()=>{"use strict";class e{constructor(){this.metabox=document.querySelector("#polarity-metabox") ... // Code continues

I'm new to Webpack, and this is my first project using it - is there anything in Webpack's settings I can use to fix it? How can I fix this error?

Webpack Config:

const path = require("path");
module.exports = {
  
  entry: {
    theme: __dirname + "/assets/js/modules-theme/index.js",
    product: __dirname + "/assets/js/modules-product/index.js",
  },
  output: {
    filename: "[name].bundled.js",
    path: path.resolve(__dirname, "assets/js/"),
  },
  mode: "production",
  watch: true,
};

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!