Skip to content

Fail to load named modules when using ConstArray dependencies#5771

Merged
sokra merged 2 commits intowebpack:masterfrom
chuckdumont:work
Oct 9, 2017
Merged

Fail to load named modules when using ConstArray dependencies#5771
sokra merged 2 commits intowebpack:masterfrom
chuckdumont:work

Conversation

@chuckdumont
Copy link
Copy Markdown
Contributor

@chuckdumont chuckdumont commented Oct 6, 2017

What kind of change does this PR introduce? Bug fix

Did you add tests for your changes? Yes

If relevant, link to documentation update: N/A

Summary Fix failure to load named modules (AMD) when using constArray dependencies.

Does this PR introduce a breaking change? No

Other information Wasn't sure about the location of the unit tests. Let me know if you want them moved.

@webpack-bot
Copy link
Copy Markdown
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Copy link
Copy Markdown
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

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

Looks good.

Comment thread test/cases/amd/namedModules/index.js Outdated

define(["named1", "named2"], function(named1, named2) {
it("should load the named modules in defined dependencies", function() {
"named1".should.be.eql(named1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you switch variable and string so the expected and actual values are correct?

named1.should.be.eql("named1");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK. The only reason I did it that way was to avoid throwing an exception if the variable named1 is undefined (e.g. "Unable to read property should of undefined").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BTW, could you provide pointers to webpack-bot info? I like the review workflow that you've implemented and would like to do something similar with projects I work on. Thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@webpack-bot
Copy link
Copy Markdown
Contributor

@chuckdumont Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@sokra sokra merged commit 457bf80 into webpack:master Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants