-
Notifications
You must be signed in to change notification settings - Fork 30k
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
webpack-env.d.ts is not included in the export to the @types/webpack npm package #10578
Comments
There is the issue that the file webpack-env.d.ts is not included in the package, this is an easy one to fix. but there is still the question of how you get this into your compilation. webpack-env.d.ts has a conflicting definition for require that will not allow it to be included along with node.d.ts. I am not familiar with webpack usage to be able to tell if this is correct or not. there are two options here,
I am inclined to do 2, so let me know if you think this is not correct. |
Fix #10578: Include webpack-env.d.ts in webpack
I'm having a hard time using webpack-env's Module since there is also a Module in index.d.ts Should we rename wepack-env Module to EnvModule? |
this does not work; VS Code still says it's unable to find name "require". |
@mhegazy , |
In VS Code it does not work, but when compiling with webpack it works. |
There is another issue with |
Fixed with #11684 |
@iotch , I'm not sure about your error, but if it's specific to webpack2, maybe we need new/separate definitions |
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/types-2.0/webpack/webpack-env.d.ts
This type definitions file is necessary when using stuff added to the module namespace by webpack, such as
require
, but it's not currently being included in the npm module for Typescript 2.0 at https://www.npmjs.com/package/@types/webpackThe text was updated successfully, but these errors were encountered: