Using transpiled ES6 in Google Apps Script => ReferenceError: “SomeClass” is not defined

前端 未结 5 1361
生来不讨喜
生来不讨喜 2020-12-17 00:29

I\'m trying to use ES6 in a Google Spreadsheet (in the script.google.com part). I\'m pretty new to JavaScript and maybe the error is trivial ...


5条回答
  •  北海茫月
    2020-12-17 00:41

    As I told in the comments, GAS isn't your everyday Javascript, to overcome that error you can create a Global Var 'SomeClass', then remove the var keyword before the function you declare inside the main function. This will get rid of this error, but another one will arise.

    What's your final goal with this webpack? Why it's important within GAS?

提交回复
热议问题