-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
V3 prerelease - packaging issue #189
Comments
With V3 the module packaging is improved, i.e. webpack decides what needs to be packaged and what not. E.g. if you have 5 modules in your node modules, but your code only uses 1, then only one dependency should be packaged. Do you use the As Webpack decides over the packages, the include/exclude settings in the serverless.yml are not relevant anymore (in fact packaging did not work perfectly with previous versions), but exclusions should be declared in the webpack config file. BTW: With webpack non-source files will not be packaged at all (however you can use the webpack file-loader oder copyfiles plugins to achieve that explicitly). Can you please post your |
To better explain the issue:
Files in zip:
I don't want irrelevant items bundled into the zip: seed, test, etc.. |
@amitaymolko The contents in the ZIP look indeed as they should not! Something seems to tell webpack to report anything as "external".
Some further questions: |
using webpack: ^3.5.4 we have a single endpoint per resource that routes the different requests:
|
testing |
Ok after fixing webpack structure things seems to be working properly, both Oh another thing, I get:
every time I run |
Great that it works now 👍 . The warnings are already addressed with #126 . This is just a warning that it uses the old Serverless hooks. As I implemented the deprecation in Serverless by myself, I can assure that the warning is only annoying but not critical 😄 . |
Created new issue for dependency issue I'm having. #190 |
Using #187
^3.0.0-rc.1
vianpm
Packaging seems to be ignoring package settings in serverless.yml (include/exclude)
The output package includes the whole project folder.
package settings:
I have also set
webpackIncludeModules: true
It deploys successfully but there is a lot being zipped that doesn't need to be.
The text was updated successfully, but these errors were encountered: