Visitar URL original
Update README.md to fix sample config. by thepont · Pull Request #265 · serverless-heaven/serverless-webpack · GitHub
Skip to content

Update README.md to fix sample config. - #265

Merged
HyperBrain merged 2 commits into
serverless-heaven:masterfrom
thepont:patch-1
Oct 31, 2017
Merged

HyperBrain merged 2 commits into
serverless-heaven:masterfrom
thepont:patch-1

Conversation

@thepont

@thepont thepont commented Oct 30, 2017

Copy link
Copy Markdown
Contributor

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

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 HyperBrain left a comment

Copy link
Copy Markdown
Member

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?

Comment thread README.md Outdated
libraryTarget: 'commonjs',
path: '.webpack',
path: path.resolve(__dirname, '.webpack'),
filename: 'handler.js', // this should match the first part of function handler in `serverless.yml`

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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 😄

@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
HyperBrain pushed a commit that referenced this pull request Oct 31, 2017
Update #265

Added #260

Added release notes. Increased version.
jamesmbourne pushed a commit to jamesmbourne/serverless-webpack that referenced this pull request Oct 15, 2019
Update README.md to fix sample config.
jamesmbourne pushed a commit to jamesmbourne/serverless-webpack that referenced this pull request Oct 15, 2019
Update serverless-heaven#265

Added serverless-heaven#260

Added release notes. Increased version.
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

Successfully merging this pull request may close these issues.

2 participants