Skip to content

Commit 3209976

Browse files
authored
Update README.md
update readme thanks to netlify#52 suggestions
1 parent 98fbb45 commit 3209976

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ http://localhost:9000/hello -> folder/hello.js (must export a handler(event, con
2929

3030
The `build` function will run a single build of the functions in the folder.
3131

32+
There are additional options, introduced later:
33+
```bash
34+
-h --help
35+
-c --config
36+
-p --port
37+
```
38+
3239
### Proxying for local development
3340

3441
When your function is deployed on Netlify, it will be available at `/.netlify/functions/function-name` for any given deploy context. It is advantageous to proxy the `netlify-lambda serve` development server to the same path on your primary development server.
@@ -53,14 +60,22 @@ module.exports = {
5360
};
5461
```
5562

63+
The serving port can be changed with the `-p`/`--port` option.
64+
5665
## Webpack Configuration
5766

5867
By default the webpack configuration uses `babel-loader` to load all js files. Any `.babelrc` in the directory `netlify-lambda` is run from will be respected. If no `.babelrc` is found, a [few basic settings are used](https://github.com/netlify/netlify-lambda/blob/master/lib/build.js#L11-L15a).
5968

60-
If you need to use additional webpack modules or loaders, you can specify an additional webpack config with the `-c` option when running either `serve` or `build`.
69+
If you need to use additional webpack modules or loaders, you can specify an additional webpack config with the `-c`/`--config` option when running either `serve` or `build`.
6170

6271
The additional webpack config will be merged into the default config via [webpack-merge's](https://www.npmjs.com/package/webpack-merge) `merge.smart` method.
6372

73+
### babel configuration
74+
75+
The default webpack configuration uses `babel-loader` with a [few basic settings](https://github.com/netlify/netlify-lambda/blob/master/lib/build.js#L19-L33).
76+
77+
However, if any `.babelrc` is found in the directory `netlify-lambda` is run from, it will be used instead of the default one.
78+
6479
## License
6580

6681
[MIT](LICENSE)

0 commit comments

Comments
 (0)