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

前端 未结 5 1362
生来不讨喜
生来不讨喜 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 01:02

    Update as on 2018:

    If you are craving for modern Javascript within GAS, you can either use Webpack as described by James or if you are comfortable using Typescript, you can use clasp for this.

    Clasp is an official GAS deployment toolkit that lets you to develop your Apps Script projects locally and deploy it to Apps Script when you're done. Since the code is local, you can use your favorite IDE and development tools like git when building Apps Script projects.

提交回复
热议问题