-
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
Update README.md to fix sample config. #265
Conversation
Path needs to be an absolute path since webpack 2.3.1, sample code will not run. `- configuration.output.path: The provided value ".webpack/service" is not an absolute path!`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @thepont , great find 🙌 and thank you for the PR.
Could you add the filename change too?
README.md
Outdated
|
||
module.exports = { | ||
// ... | ||
output: { | ||
libraryTarget: 'commonjs', | ||
path: '.webpack', | ||
path: path.resolve(__dirname, '.webpack'), | ||
filename: 'handler.js', // this should match the first part of function handler in `serverless.yml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 3.x.x the filename should also be defined as [name].js
so that it can be used with automatic entry resolution, which is now the preferred way to set the entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it right now - ready to merge 😄
Update README.md to fix sample config.
Update serverless-heaven#265 Added serverless-heaven#260 Added release notes. Increased version.
Path needs to be an absolute path since webpack 2.3.1 current sample code in documentation will not run.
- configuration.output.path: The provided value ".webpack/service" is not an absolute path!
What did you implement:
Fix for a sample in the documentation, webpack requires
path
to be absolute.Closes #XXXXX
How did you implement it:
Starting with the sample code, I adjusted it so it worked. using path.resolve to resolve the abs path for web pack.
How can we verify it:
Check that sample correctly runs by running the webpack.config.js
Todos:
Is this ready for review?: Yes
Is it a breaking change?: NO