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

Handle missing src attribute on unused last script #515

Closed
wants to merge 1 commit into from

Conversation

gigabo
Copy link

@gigabo gigabo commented Jun 29, 2016

Hi,

This fixes a bug introduced in 3d3c000, in the case where:

  • __resourceQuery is set, and
  • The last script tag on the page has no src attribute

Previously the script tag's src attribute was accessed lazily only if __resourceQuery was not defined. The last script on the page may not be the script that loaded webpack-dev-server. This can happen, for example, with the use of an asynchronous loader such as LABjs.

I've pointed this PR at master, but it is based on v1.14.1, which is the latest non-beta release. We are not on webpack >=2.0.3-beta <3, so we would need this bug fix on the ^1.14.1 range. How are you handling patches there?

Thanks,

Bo

This fixes a bug introduced in 3d3c000, in the case where:

- `__resourceQuery` is set, and
- The last script tag on the page has no `src` attribute

Previously the script tag's `src` attribute was accessed lazily only if
`__resourceQuery` was not defined.  The last script on the page may not be the
script that loaded webpack-dev-server.  This can happen, for example, with the
use of an asynchronous loader such as LABjs.
@gigabo
Copy link
Author

gigabo commented Jun 29, 2016

Oh, this is basically equivalent to #447. Just need that applied in ^1.14.1.

gigabo added a commit to gigabo/react-server that referenced this pull request Jun 30, 2016
This is new enough to pass `nsp check`, but old enough to not suffer from
[this bug](webpack/webpack-dev-server#515).
gigabo added a commit to gigabo/react-server that referenced this pull request Jun 30, 2016
This is new enough to pass `nsp check`, but old enough to not suffer from
[this bug](webpack/webpack-dev-server#515).

This fixes redfin#311.
gigabo added a commit to redfin/react-server that referenced this pull request Jun 30, 2016
This is new enough to pass `nsp check`, but old enough to not suffer from
[this bug](webpack/webpack-dev-server#515).

This fixes #311.
davidalber pushed a commit to davidalber/react-server that referenced this pull request Jul 24, 2016
This is new enough to pass `nsp check`, but old enough to not suffer from
[this bug](webpack/webpack-dev-server#515).

This fixes redfin#311.
@SpaceK33z
Copy link
Member

I'll make sure to backport this for the next v1 release. Also see #363.

@SpaceK33z SpaceK33z closed this Aug 21, 2016
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