Skip to content

Commit cedb57f

Browse files
authored
Update README.md
1 parent a6734c2 commit cedb57f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@ Say you are running `webpack-serve` on port 8080 and `netlify-lambda serve` on p
3131

3232
See [netlify/create-react-app-lambda](https://github.com/netlify/create-react-app-lambda/blob/3b5fac5fcbcba0e775b755311d29242f0fc1d68e/package.json#L19) for an example of how to do this.
3333

34+
[Example webpack config](https://github.com/imorente/netlify-functions-example/blob/master/webpack.development.config):
35+
36+
```js
37+
module.exports = {
38+
mode: 'development',
39+
devServer: {
40+
proxy: {
41+
"/.netlify": {
42+
target: "http://localhost:9000",
43+
pathRewrite: {"^/.netlify/functions" : ""}
44+
}
45+
}
46+
}
47+
}
48+
```
49+
3450
## Webpack Configuration
3551

3652
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).

0 commit comments

Comments
 (0)