-
Notifications
You must be signed in to change notification settings - Fork 270
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
module and process variables #121
Comments
minimal-env.js isn't actual code, that's a closure compiler externs file. Can you explain the problem you are facing in more detail? |
When I am using any sort of IDE, its taking minimal-env.js as the global declarations for module and process. Hence, resulting in errors when I do module.exports or process.env.PORT for example. |
That's strange, I've never seen a problem like this using any sort of IDE I use. Given that it's not feasible to delete the file as long as we want to use it with closure compiler, I'm also not sure what to do here. |
I have not been through the codebase entirely and I intend to do that, but is it necessary to name those variables as process and module? |
Yeah, that's necessary, since the file indicates the expected environment when compiling with closure compiler, to make it aware of it, so it doesn't rename the wrong things during optimizations. More information about externs: https://developers.google.com/closure/compiler/docs/externs-and-exports |
Alright then should I put it in .npmignore and make a PR because we dont need the npm package to have that since its only needed for the closure compiler? |
Alright I have opened a PR for the same. |
Is there any update @dcodeIO |
@dcodeIO Thank you for your great efforts on creating and supporting this awesome package, but this Any chances to have an update? As a workaround for people coming here from Google search: right click on |
I think with #124 merged into master, we can close this issue now |
@mdhishaamakhtar and @dcodeIO, thank you so very much for this fix! Hope to see updates in NPM soon. |
Since #124 is still not added in the latest release, I'll let this stay open until there is a new release for npm |
@dcodeIO If you could publish a new release to npm, then we could close this issue. |
@dcodeIO any updates about release? |
The variables module and process in the file minimal-env.js is overriding the definition of module and process in Node.js
The text was updated successfully, but these errors were encountered: