Skip to content

Commit c6d2663

Browse files
committed
update readme
1 parent 9117c36 commit c6d2663

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Diff for: README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ The additional webpack config will be merged into the default config via [webpac
347347

348348
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).
349349

350-
However, if any `.babelrc` is found in the directory `netlify-lambda` is run from, or [folders above it](https://github.com/netlify/netlify-lambda/pull/92) (useful for monorepos), it will be used instead of the default one.
350+
However, if any `.babelrc` is found in the directory `netlify-lambda` is run from, or [folders above it](https://github.com/netlify/netlify-lambda/pull/92) (useful for monorepos), it will be used instead of the default one.
351+
352+
It is possible to disable this behaviour by passing `--babelrc false`.
351353

352354
If you need to run different babel versions for your lambda and for your app, [check this issue](https://github.com/netlify/netlify-lambda/issues/34) to override your webpack babel-loader.
353355

@@ -393,6 +395,7 @@ There are additional CLI options:
393395
-p --port
394396
-s --static
395397
-t --timeout
398+
-b --babelrc
396399
```
397400

398401
### --config option
@@ -422,6 +425,12 @@ The serving port can be changed with the `-p`/`--port` option.
422425

423426
If you need an escape hatch and are building your lambda in some way that is incompatible with our build process, you can skip the build with the `-s` or `--static` flag. [More info here](https://github.com/netlify/netlify-lambda/pull/62).
424427

428+
### --babelrc
429+
430+
Defaults to `true`
431+
432+
Use a `.babelrc` found in the directory `netlify-lambda` is run from. This can be useful when you have conflicting babel-presets, more info [here](#babel-configuration)
433+
425434
## Netlify Identity
426435

427436
Make sure to [read the docs](https://www.netlify.com/docs/functions/#identity-and-functions) on how Netlify Functions and Netlify Identity work together. Basically you have to make your request with an `authorization` header and a `Bearer` token with your Netlify Identity JWT supplied. You can get this JWT from any of our Identity solutions from [gotrue-js](https://github.com/netlify/gotrue-js) to [netlify-identity-widget](https://github.com/netlify/netlify-identity-widget).

Diff for: bin/cmd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const stringBooleanToBoolean = val => {
2626
program
2727
.option("-c --config <webpack-config>", "additional webpack configuration")
2828
.option("-p --port <port>", "port to serve from (default: 9000)")
29-
.option("-b --babelrc <no-babelrc>", "use .babelrc in root (default: true)", stringBooleanToBoolean)
29+
.option("-b --babelrc babelrc>", "use .babelrc in root (default: true)", stringBooleanToBoolean)
3030
.option(
3131
"-t --timeout <timeout>",
3232
"function invocation timeout in seconds (default: 10)"

0 commit comments

Comments
 (0)