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

Update README.md to fix sample config. #265

Merged
merged 2 commits into from Oct 31, 2017

Conversation

Projects
None yet
2 participants
@thepont
Copy link
Contributor

thepont commented Oct 30, 2017

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:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: Yes
Is it a breaking change?: NO

Update README.md
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!`

@thepont thepont changed the title Update README.md Update README.md to fix sample config. Oct 30, 2017

@HyperBrain
Copy link
Member

HyperBrain left a comment

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`

This comment has been minimized.

@HyperBrain

HyperBrain Oct 30, 2017

Member

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.

This comment has been minimized.

@HyperBrain

HyperBrain Oct 31, 2017

Member

Changed it right now - ready to merge 😄

@HyperBrain HyperBrain added this to the 4.0.0 milestone Oct 31, 2017

@HyperBrain HyperBrain merged commit 0c650a0 into serverless-heaven:master Oct 31, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 91.006%
Details

HyperBrain added a commit that referenced this pull request Oct 31, 2017

Update examples added
Update #265

Added #260

Added release notes. Increased version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment