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

Broken insert option #264

Closed
medfreeman opened this issue May 28, 2020 · 5 comments · Fixed by #265
Closed

Broken insert option #264

medfreeman opened this issue May 28, 2020 · 5 comments · Fixed by #265
Labels

Comments

@medfreeman
Copy link
Contributor

medfreeman commented May 28, 2020

While using the insert option, i get the following error when the application tries to insert a chunk in the browser:

Uncaught (in promise) ReferenceError: insert is not defined
    at bootstrap:891
    at new Promise (<anonymous>)
    at Function.requireEnsure [as e] (bootstrap:861)
    at Function.fn.e (bootstrap:155)
    at load (UpgradeLicense.tsx:7)
    at Object.config.then (universalImport.js:8)

In fact, the user provided insert function is not injected into the bundle code.

Culprit is this line (from #226): d41bafa#diff-1fdf421c05c1140f6d71444ea2b27638L385

The code responsible for injecting it has been forgotten in this PR.

In addition to this, this part of the feature isn't covered by #202 tests, but i imagine it's not really possible to test it in a more realistic fashion.

Culprit here: 6cd6510#diff-20c6b42869bc2385bcef4e1d9a7afa04R118-R124

medfreeman added a commit to medfreeman/extract-css-chunks-webpack-plugin that referenced this issue May 28, 2020
@medfreeman medfreeman changed the title broken insert option Broken insert option May 28, 2020
ScriptedAlchemy pushed a commit that referenced this issue May 30, 2020
@khitrenovich
Copy link

@ScriptedAlchemy Is this fix out already? We are running into the same error on upgrade to v4.7.5...

@adi518
Copy link

adi518 commented Sep 22, 2020

@khitrenovich I'd say yes, because its corresponding PR was merged.

@khitrenovich
Copy link

@khitrenovich I'd say yes, because its corresponding PR was merged.

Okay, so I just did some deep dive into that.

The PR was merged on May 30, while v4.7.5 (latest) was released on May 18 -

~> npm view extract-css-chunks-webpack-plugin time --json | grep 4.7.5
  "4.7.5": "2020-05-18T17:30:15.836Z"
~> 

So apparently the fix is not released yet, and I've just opened #297 about it.

@adi518
Copy link

adi518 commented Sep 22, 2020

Great, I hope it gets published soon, because it takes like a minute to be done with it.

@ScriptedAlchemy
Copy link
Collaborator

🎉 This issue has been resolved in version 4.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

4 participants