Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance plugin for "serverless deploy --package" use case #546

Closed
kushanson opened this issue Dec 17, 2019 · 4 comments
Closed

Enhance plugin for "serverless deploy --package" use case #546

kushanson opened this issue Dec 17, 2019 · 4 comments

Comments

@kushanson
Copy link

This is a Feature Proposal

Description

Enhance serverless-webpack such that it does not execute any webpack tasks during "serverless deploy" when the "--package" option is present.

For bug reports:

  • What went wrong?
  • What did you expect should have happened?
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
    Use Case:
    serverless supports "--package" option for the "serverless deploy" command. "--package" option is used to point to an already bundled ".serverless" folder. In this case, the webpack bundling would have occurred during "serverless package" phase to generate the ".serverless" folder. Webpack bundling does not need to occur again when using "--package" option with "serverless deploy" command. It would be ideal to not have any dependency on webpack when using "--package" option since all bundling has already occurred.

  • If there is additional config how would it look
    no additional config

Similar or dependent issue(s):

Additional Data

  • Serverless-Webpack Version you're using: 5.3.1
  • Webpack version you're using: 4.41.2
  • Serverless Framework Version you're using: 1.57.0
  • Operating System: Windows 10
  • Stack Trace (if available): N/A
@jamesmbourne
Copy link
Contributor

@kushanson this sounds like a logical extension of the --no-build functionality I am working on in #504. If I understand correctly, you are suggesting:

  • deploy --no-build will not re-run any Webpack tasks, but will still generate CloudFormation etc. (at least when using the AWS provider) in the .serverless directory.
  • deploy --package will instruct serverless-webpack not to run any Webpack tasks, and Serverless will use existing output in .serverless.

This sounds like #504 is merged this should be fairly simple to implement by extending the plugin to not re-run Webpack tasks if the --package flag is present.

I think it is worth keeping the --no-build flag as an option as this serves a separate use case.

@kushanson
Copy link
Author

@jamesmbourne you understand correctly. What you commented sounds good to me.

@trent-dailey
Copy link

@jamesmbourne any update on this?

@vicary vicary added the awaiting reply Awaiting for a reply from the OP label Dec 16, 2022
@vicary
Copy link
Member

vicary commented Dec 16, 2022

AFAIK --no-build is no longer supported, its feature is covered by --skip-build and --package.

Tested with the typescript example, webpack compile is not running when --package option is set.

@trent-dailey @jamesmbourne Feel free to reopen this if the problem still persist.

@vicary vicary closed this as completed Dec 16, 2022
@vicary vicary removed the awaiting reply Awaiting for a reply from the OP label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants