-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Update webpack.config.js #46
Conversation
Load `resolve` option from custom webpack config file
I can also add |
@@ -77,6 +78,22 @@ if (fs.existsSync(customConfigPath)) { | |||
logger.info(' => Loading custom webpack plugins.'); | |||
config.plugins = config.plugins.concat(customConfig.plugins); | |||
} | |||
|
|||
// load resolve.extensions | |||
if (customConfig.resolve && customConfig.resolve.extensions) { |
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.
I think it's safe to allow the whole resolve API. Not just extensions and resolve.
Adding .js
and node_modules
is a clever idea. I like it.
@louy with the above comment, I think alias thing will work too. |
Additionally, we need to copy any other field in the customConfig except for the following map: {
"context": true,
"entry": true,
"output": true,
"module": true,
"resolve": true,
"resolveLoader": true,
"externals": true,
"target": true,
"devtool": true,
"devServer": true,
"node": true,
"amd": true,
"loader": true,
"recordsPath": true,
"recordsInputPath": true,
"recordsOutputPath": true,
"plugins": true
} This helps us to support postCss and similar. |
+1 for |
for me an overridable resolve field will solve the same jsx problem for me |
I would also include |
Update babel-eslint to version 7.0.0 🚀
Show comments and login button for guests
Improve addon bootstrapping
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bedbb65. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Load
resolve
option from custom webpack config file.I don't always like adding the ".jsx" extension to my "require" calls.