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 README.md #24

Merged
merged 2 commits into from
Apr 20, 2016
Merged

Update README.md #24

merged 2 commits into from
Apr 20, 2016

Conversation

philiiiiiipp
Copy link
Contributor

Excluding the node_modules folder might be easier in some contexts.

Excluding the node_modules folder might be easier in some contexts.
@AriaFallah
Copy link
Owner

@philiiiiiipp the reason why I was tentative about including the exclude option is that there is actually a more performance overhead to exclusion than inclusion. It's easier to tell webpack where your files are rather than where they aren't because then webpack has to actually look for your files.

But given that, I'll merge this if you show me an example of when exclude is the only option because I've personally never come across that case.

The only thing I can ever think of is that if you don't have a src folder where you keep all your files, but in that case the easier option would just to be to make a src folder.

@philiiiiiipp
Copy link
Contributor Author

I understand your concern, but I don't think that there is a difference between exclude and include in terms of performance since webpack will apply the regex to every file/folder regardless of you using exclude or include:

exclude: A condition that must not be met
include: A condition that must be met

Regarding the src folder, I would argue that most server side nodejs code does not have a src folder. At least it's the (somewhat standard) way that express.js will generate for you. But this is of course more of a personal preference thing.

@@ -218,6 +218,9 @@ by an extreme amount.

`include` prevents this by specifying that this loader only applies to `.js` files in your `src` directory.

Alternative you could change `include: path.join(__dirname, 'src')` to `exclude: /node_modules/` which will then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace Alternative with Alternatively

@AriaFallah
Copy link
Owner

@philiiiiiipp I guess I don't see any harm. Please just fix that one typo and I'll merge.

@philiiiiiipp
Copy link
Contributor Author

Ok cool. Btw. awesome work!

@AriaFallah AriaFallah merged commit 335bed7 into AriaFallah:master Apr 20, 2016
@AriaFallah
Copy link
Owner

AriaFallah commented Apr 20, 2016

@philiiiiiipp I appreciate it.

Hopefully, when I find the time, there will be a new version in gitbook format, that covers a lot more, and has helpful illustrations that I'll draw. I actually got halfway done around 2 weeks ago, but I have been short on time so it's been shelved.

@philiiiiiipp
Copy link
Contributor Author

Cool stuff, I am going to have an eye out for that :-)

On Wed, Apr 20, 2016 at 4:31 PM, Aria Fallah [email protected]
wrote:

@philiiiiiipp https://github.com/philiiiiiipp I appreciate it.

Hopefully, when I find the time, there will be a new version in gitbook
format, that covers a lot more and has helpful illustrations that I'll
draw. I actually got halfway done around 2 weeks ago, but I have been short
on time.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#24 (comment)

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.

2 participants