ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: darioup on December 13, 2017, 10:34:24 pm

Title: How to bundle pqgrid with Webpack, to make it es6 strict mode compatible?
Post by: darioup on December 13, 2017, 10:34:24 pm
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)
Title: Re: How to bundle pqgrid with Webpack, to make it es6 strict mode compatible?
Post by: paramvir 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.