-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Made webpack respect NODE_PATH environment variable #476
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,9 @@ module.exports = { | |
publicPath: '/' | ||
}, | ||
resolve: { | ||
// This allows you to set a root for where webpack should look for modules. | ||
// This enables you to use absolute imports from the root. | ||
root: path.resolve(env['process.env.NODE_PATH']), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably use just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this work for multiple paths?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure the exact reason for It does not currently support multiple paths. Would that be something you want me to add in this PR? |
||
// These are the reasonable defaults supported by the Node ecosystem. | ||
extensions: ['.js', '.json', ''], | ||
alias: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env.js
is only used for variables injected into the app.Doesn't seem like it's useful to expose it to the path.