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

Select JS chunk with some extra logic, fixes a bug with webpack 4 + mini-css-extract-plugin #129

Closed
wants to merge 4 commits into from

Conversation

Ambroos
Copy link
Contributor

@Ambroos Ambroos commented Apr 20, 2018

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

@coveralls
Copy link

coveralls commented Apr 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 58524c0 on medialaan:master into 09001fe on markdalgleish:master.

@boris-jarkowicz
Copy link

@Ambroos

awesome, checks are green! Really hopeful this will work now with mini-css-extract-plugin.

@Ambroos
Copy link
Contributor Author

Ambroos commented May 15, 2018

@boris-jarkowicz We've been using this with mini-css-extract-plugin and webpack 4.x since the day I created the pull request, with zero issues!

@erichbehrens
Copy link

erichbehrens commented May 16, 2018

I have the same issue and this PR fixes it. Thank you @Ambroos

@Ambroos
Copy link
Contributor Author

Ambroos commented May 16, 2018

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

@Mydayyy
Copy link

Mydayyy commented Jun 4, 2018

Honestly does look more like a permanent solution. I guess this projects is abandoned. Are there any good alternatives to this plugin?

@jakierice
Copy link

Thank you, @Ambroos. This PR was the fix that finally got me up and running again.

@stevenpetryk
Copy link

@markdalgleish would you be able to chime in here and let us know if this will be merged? Thank you for making this plugin 😊

@sebbdk
Copy link

sebbdk commented Nov 19, 2018

I hate to bumb, but would love to see some progress on this as well. :/
Had to pull the fork to get it working.

Dont mind doing some work if need be.

@Ambroos
Copy link
Contributor Author

Ambroos commented Nov 19, 2018

@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.

@jahredhope
Copy link
Collaborator

I agree with this change. Unfortunately there is a merge conflict.
Is someone able to are you able to update this PR @Ambroos?

@Ambroos
Copy link
Contributor Author

Ambroos commented Nov 19, 2018

@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)

@Ambroos Ambroos closed this Nov 19, 2018
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.

Webpack 4 support?
10 participants