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

Migrating from serverless-webpack #22

Open
aymericbeaumet opened this issue Jun 13, 2017 · 2 comments
Open

Migrating from serverless-webpack #22

aymericbeaumet opened this issue Jun 13, 2017 · 2 comments

Comments

@aymericbeaumet
Copy link

aymericbeaumet commented Jun 13, 2017

I would like to migrate my project from serverless-webpack to this plugin. There are some points I would like to discuss. It seems this repository is actively maintained, so we might find ways to increase the developer experience.

I didn't have the time to investigate yet, but the following two points are mandatory to me for seriously considering the migration, and I didn't see them in the documentation:

  • make sure the integration with serverless-offline works seamlessly
  • offer an alternative to the webpackIncludeModules option. It should leverage the yarn.lock file to produce deterministic bundles when possible 👌 (and fallback to npm)

I would be happy to contribute in anyway I could 👍

@jogold
Copy link
Contributor

jogold commented Jun 19, 2017

Hello @aymericbeaumet,

Thank you for your message.

I'm currently not using serverless-offline in my projects, have you tried it already with this plugin ?

Regarding the webpackIncludeModules option, what do you want to achieve exactly ? I'm currently following this PR serverless/serverless#3737, have you seen it ?

@aymericbeaumet
Copy link
Author

I did not try to use your plugin along with serverless-offline yet, but as far as I understand you have to explicitly hook on the appropriate events to be able to build the bundle at the appropriate moment. serverless-webpack seems to do it here.

Its webpackIncludeModules option allows to include the webpack externals modules inside the build. More precisely it performs npm install [email protected] [email protected] with the external modules (using the versions from the package.json). That's why I was mentioning yarn, which could be used instead when a yarn.lock is found. I don't know if it's possible to only specify a specific list of packages in that case though (yarn add a b).

serverless/serverless#3737 seems to address a different issue, which would be complementary to the webpackIncludeModules approach. It allows to exclude dev dependencies from the build.

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

2 participants