path.parse method does not get included when bundling for target:web

Do you want to request a feature or report a bug?

What is the current behavior?
For target:web If a module is using import { parse } from 'path';, It will fail on the client since it won’t be sent/mocked.

If the current behavior is a bug, please provide the steps to reproduce.

Just add the import described below and have the option for node: {fs: 'empty'} in your webpack config.

If this is a feature request, what is motivation or use case for changing the behavior?
I’m not sure if there is a reason not to support this, but if so, there should be an error message indicating what’s happening and why.

**Please mention other relevant information such as the browser version, Node.js version,
Latests MacOs, node and webpack

Author: Fantashit

2 thoughts on “path.parse method does not get included when bundling for target:web

  1. Just as a side note , I think it will be very useful to give a warning (I think it should be doable since you are spidering dependencies) when using methods that are known to not be there. I will try to send a PR sometime in the future if you find it useful.

  2. Problem not solved?
    Uncaught TypeError: path__WEBPACK_IMPORTED_MODULE_5___default.a.parse is not a function

Comments are closed.