Author Topic: How to bundle pqgrid with Webpack, to make it es6 strict mode compatible?  (Read 2387 times)

darioup

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 4
  • Webmaster Creativo
    • View Profile
Hi, I use laravel mix which uses Webpack to optimize js files in common js modules. When I compile js assets it gives me an error on pqgrid.dev.js
Code: [Select]
Syntax Error: ‘with’ in strict modeI read this is beacause js with() statement is not allowed in es6
How can I replace this fragment of code which uses with() statement to be es6 strict mode compatible?
Code: [Select]
with(obj.getRange = function() {
   return {
      r1: r,
      c1: c
   }
}, obj)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to bundle pqgrid with Webpack, to make it es6 strict mode compatible?
« Reply #1 on: December 14, 2017, 03:09:15 pm »
It's part of the functionality and with is used for a good reason.

You may comment the code block to make it es6 strict mode compatible if you don't need the Excel formulas support.
« Last Edit: December 14, 2017, 03:11:17 pm by paramquery »