Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed May 18, 2021
1 parent a13c7ce commit 47e7a0a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,23 @@ instance.waitUntilValid(() => {
});
```

### `getFilenameFromUrl(context, url)`

Get filename from url.

```js
const webpack = require('webpack');
const compiler = webpack({ ... });
const middleware = require('webpack-dev-middleware');
const instance = middleware(compiler);

app.use(instance);

const processRequest = (req, res) => {
const filename = instance.getFilenameFromUrl(instance.contex, req.url);
}
```

## Known Issues

### Multiple Successive Builds
Expand Down

0 comments on commit 47e7a0a

Please sign in to comment.