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
Select JS chunk with some extra logic, fixes a bug with webpack 4 + mini-css-extract-plugin #129
Conversation
…elying on it to be the first in the array
Add parenthesis to fix tests
awesome, checks are green! Really hopeful this will work now with |
@boris-jarkowicz We've been using this with |
I have the same issue and this PR fixes it. Thank you @Ambroos |
For those waiting for this to be merged, you can temporarily just refer to a fixed commit instead: yarn add --dev static-site-generator-webpack-plugin@medialaan/static-site-generator-webpack-plugin#58524c0
# or
npm install --save-dev static-site-generator-webpack-plugin@medialaan/static-site-generator-webpack-plugin#58524c0 |
Honestly does look more like a permanent solution. I guess this projects is abandoned. Are there any good alternatives to this plugin? |
Thank you, @Ambroos. This PR was the fix that finally got me up and running again. |
@markdalgleish would you be able to chime in here and let us know if this will be merged? Thank you for making this plugin 😊 |
I hate to bumb, but would love to see some progress on this as well. :/ Dont mind doing some work if need be. |
@jahredhope is our best hope here (pun intended). FYI, I no longer work at Medialaan. While I do not expect the people at Medialaan to take https://github.com/medialaan/static-site-generator-webpack-plugin offline, I just think it's best to let you know. |
I agree with this change. Unfortunately there is a merge conflict. |
@jahredhope see #138 (for others: since I no longer have access to the source repo of this PR I created a new one with the same changes but no merge conflicts) |
For our internal projects, this fixed #123. The problem, as listed in the issue (thanks @richsilv), was that static-site-generator-webpack-plugin assumed that when multiple assets were present for a chunk, the first chunk would be the JS chunk.
This assumption has been replaced with a simple Array.find() to find the first /.js$/ match instead.
For those waiting for this to be merged, you can temporarily just refer to a fixed commit instead:
yarn add --dev static-site-generator-webpack-plugin@medialaan/static-site-generator-webpack-plugin#58524c0 # or npm install --save-dev static-site-generator-webpack-plugin@medialaan/static-site-generator-webpack-plugin#58524c0