Skip to content

Commit

Permalink
explicitly mention to use ./ in require() for local files, closes #1774
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Feb 23, 2018
1 parent 61c1994 commit d430656
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readme.markdown
Expand Up @@ -510,7 +510,9 @@ If `file` is an array, each item in `file` will be added as an entry file.

Make `file` available from outside the bundle with `require(file)`.

The `file` param is anything that can be resolved by `require.resolve()`.
The `file` param is anything that can be resolved by `require.resolve()`,
including files from `node_modules`. Like with `require.resolve()`, you must
prefix `file` with `./` to require a local file (not in `node_modules`).

`file` can also be a stream, but you should also use `opts.basedir` so that
relative requires will be resolvable.
Expand Down

0 comments on commit d430656

Please sign in to comment.