Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Update webpack.config.js #46

wants to merge 2 commits into from

Conversation

louy
Copy link

@louy louy commented Apr 4, 2016

Load resolve option from custom webpack config file.

I don't always like adding the ".jsx" extension to my "require" calls.

louy added 2 commits April 5, 2016 00:29
Load `resolve` option from custom webpack config file
@louy
Copy link
Author

louy commented Apr 4, 2016

I can also add resolve.alias option, which would solve #44.

@@ -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) {
Copy link
Member

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.

@arunoda
Copy link
Member

arunoda commented Apr 5, 2016

@louy with the above comment, I think alias thing will work too.

@arunoda
Copy link
Member

arunoda commented Apr 5, 2016

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.
See: #43 (comment)

@achebatko
Copy link

+1 for resolve.alias

@crooy
Copy link

crooy commented Apr 5, 2016

for me an overridable resolve field will solve the same jsx problem for me

@arunoda arunoda mentioned this pull request Apr 6, 2016
@BowlingX
Copy link

BowlingX commented Apr 6, 2016

I would also include preLoaders in module to support eslint and others.

@arunoda
Copy link
Member

arunoda commented Apr 6, 2016

Thanks to @eloytoro's PR #64 now we can use resolve and other custom webpack configurations.
Try version: 1.5.0.

@arunoda arunoda closed this Apr 6, 2016
ndelangen pushed a commit that referenced this pull request Apr 5, 2017
Update babel-eslint to version 7.0.0 🚀
ndelangen pushed a commit that referenced this pull request Apr 11, 2017
Show comments and login button for guests
ndelangen pushed a commit that referenced this pull request Apr 11, 2017
ndelangen pushed a commit that referenced this pull request Apr 23, 2017
add onDragStart property
@shilman shilman added the misc label May 27, 2017
ndelangen pushed a commit that referenced this pull request Feb 23, 2024
Copy link

nx-cloud bot commented May 7, 2024

☁️ Nx Cloud Report

CI 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 target

Sent with 💌 from NxCloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants