Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

feat: support loading node core modules #76

Merged
merged 7 commits into from
Jul 4, 2017
Merged

feat: support loading node core modules #76

merged 7 commits into from
Jul 4, 2017

Conversation

FrogTheFrog
Copy link
Contributor

@FrogTheFrog FrogTheFrog commented Jul 4, 2017

Should no longer throw errors for missing node modules, such as fs, path and etc.

It applies NodeTargetPlugin to child compiler if the main target uses NodeTargetPlugin. Every target apart from webworker and web use NodeTargetPlugin.

Fixes #44, #55

@jsf-clabot
Copy link

jsf-clabot commented Jul 4, 2017

CLA assistant check
All committers have signed the CLA.

@joshwiens joshwiens changed the title Allow worker-loader to load node core modules feat: Allow worker-loader to load node core modules Jul 4, 2017
@TrySound
Copy link
Contributor

TrySound commented Jul 4, 2017

Thanks @FrogTheFrog
Would be great if you will add test case.

@michael-ciniawsky michael-ciniawsky changed the title feat: Allow worker-loader to load node core modules feat: support loading node core modules Jul 4, 2017
@michael-ciniawsky michael-ciniawsky added this to the 0.9.0 milestone Jul 4, 2017
@FrogTheFrog
Copy link
Contributor Author

FrogTheFrog commented Jul 4, 2017

@TrySound 2 simple tests added. One for dependencies that should be missing (when target is web or webworker) and one for when dependencies should not be missing.

@TrySound
Copy link
Contributor

TrySound commented Jul 4, 2017

Nice

@FrogTheFrog
Copy link
Contributor Author

FrogTheFrog commented Jul 4, 2017

@TrySound I decided to actually add tests for all targets instead of assuming that it should work.

@TrySound
Copy link
Contributor

TrySound commented Jul 4, 2017

Good

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

👍

`this.options` is deprecated so why not?
@TrySound TrySound merged commit ab74732 into webpack-contrib:master Jul 4, 2017
joshwiens pushed a commit that referenced this pull request Sep 25, 2017
* Allow worker-loader to load node core modules
* added tests for all targets
* change this.options.target to this.target
@michael-ciniawsky michael-ciniawsky removed this from the 1.1.0 milestone Oct 12, 2017
TheLD6978 pushed a commit to TheLD6978/worker-loader that referenced this pull request Apr 16, 2021
* Allow worker-loader to load node core modules
* added tests for all targets
* change this.options.target to this.target
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants