gas-webpack-plugin | Webpack plugin for Google Apps Script | Plugin library
kandi X-RAY | gas-webpack-plugin Summary
kandi X-RAY | gas-webpack-plugin Summary
In Google Apps Script, an entry point called from google.script.run must be a top level function declaration on the server side. gas-webpack-plugin detects function assignment expressions to global object and generate a corresponding top level function declaration statement.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets gasify when chunk is present
- Creates a new gas plugin .
gas-webpack-plugin Key Features
gas-webpack-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on gas-webpack-plugin
QUESTION
EDIT1:I made a minimum reproduction repository here
code & reproduction steps are available at the repository.
EDIT2: Same error occurs when I embeded the transpiled code on html file.
EDIT3: I tracked down the main cause of this problem.
When I use gas-webpack-plugin, output file pukes this error. Simply removing the plugin solves the problem, but then I cannot access my main function on GAS.
I created a github issue on the official gas-webpack-plugin . Hope there's a workaround for this.
---Original question from here---
I'm using Clasp + Typescript + Webpack + Babel to locally develop GAS with npm libraries.
Until I used decorator in my project, it was working fine. However, using decorator(more precisely, class-validator) results in following error on GAS...
ANSWER
Answered 2022-Mar-11 at 03:37I talked to the author of the gas-webpack-plugin. https://github.com/fossamagna/gas-webpack-plugin/issues/685
When using decorators, gas-webpack-plugin exposes not only main()
but also classValidatorMetadataStorage()
to the top level.
By simply removing this from the transpiled file, I was able to run the code with decorators.
But we now don't have to do this manually now. The author already took care of the situation. As of gas-webpack-plugin@2.2.0, it has include option to avoid unnecessary function exposure.
Usase:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gas-webpack-plugin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page