-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require !== null results in Cannot find module "." #2670
Comments
Now I am confused. I added following plugin and it seems to work now the resulting bundle now containes
which replaces the Is that the way to fix that issue? |
Ah, good someone else has this problem too. The Cesium lib is using an |
@bensleveritt got it working with webpack2 |
Hey @bryall I tried adding your RegExp but webpack says it's invalid (Unexpected token) at the second dot. I tried escaping the middle slash ( |
Same problem here |
@manuelnas I tried escaping too and it worked for me. I'm using webpack 2.3.3 |
I am working on this problem for over 2days, and I just made it through by hardcoding the URL string in 'require' instead of passing on a variable: I know the hard-code is bad, but I cannot find any other solution to it. |
|
Webpack version:
2.1.0-beta.13
Please tell us about your environment:
Windows 8.1
Current behavior:
import 'moment-jdateformatparser';
In the resulting bundle all occurrences of
require
are replaced. But the null check in the following if statement is replaced in a faulty way.original
It seems that the mechanism evaluates the require statement without any module and generates the module not found error clause.
bundle output
That only the require reference is replaced by the mechanism like so
or something related to that.
The text was updated successfully, but these errors were encountered: