You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the webpack plugin does not allow for custom scripts to be executed while packaging the functions/service. The packager part creates a small package.json that only contains the dependencies to make sure that they are bundled correctly.
Issues like #342 show, that there are cases where invoking a script after the packager install might be needed.
A possible approach would be to add a list of inline scripts as packageOptions.scripts[] that are added to the package.json and executed serially with "npm/yarn run" after the install has finshed. The script entries can be anything that is allowed for a package.json script entry. This will give users more power to cover these situations.
Also, as I was doing research for on this issue, I spent a lot of time going through the Webpack documentation. Is this really a Webpack or serverless-webpack issue, or does it not matter?
It is a serverless-webpack issue. As soon as it allows to execute the rebuild, everything should be fine. On Windows this will happen frequently if you use compiled binaries, because the local "build" will guess that the package is for Windows.
This is a Feature Proposal
Description
Currently the webpack plugin does not allow for custom scripts to be executed while packaging the functions/service. The packager part creates a small package.json that only contains the dependencies to make sure that they are bundled correctly.
Issues like #342 show, that there are cases where invoking a script after the packager install might be needed.
A possible approach would be to add a list of inline scripts as
packageOptions.scripts[]
that are added to the package.json and executed serially with "npm/yarn run" after the install has finshed. The script entries can be anything that is allowed for a package.json script entry. This will give users more power to cover these situations.Sample for the referenced issue:
Similar or dependent issue(s):
Additional Data
N/A
The text was updated successfully, but these errors were encountered: