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

add extract-text-webpack-plugin helper package #4532

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

erquhart
Copy link
Contributor

@erquhart erquhart commented Mar 14, 2018

Provides shared per-stage extract-text-webpack-plugin instances for all Gatsby plugins, including Gatsby core (implementation PR will follow). Gatsby styling plugins currently overwrite one another's output during the build whenever multiple extract-text-webpack-plugin instances are added to the Webpack config (the Netlify CMS plugin does this). This happens because the plugins are importing extract-text-webpack-plugin and instantiating a new instance direct from the constructor. The module added by this PR allows all plugins to use the same instance.

In short, this enables a simpler and more reliable way to achieve the fix from #4495 for all plugins.

Related to #4516.

Note: the conventions in this PR are borrowed from gatsby-1-config-css-modules with the assumption that that package is a desirable pattern for Gatsby config helpers.

@ghost ghost assigned erquhart Mar 14, 2018
@ghost ghost added the review label Mar 14, 2018
@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 5945d98

https://deploy-preview-4532--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Mar 14, 2018

Deploy preview for gatsbygram ready!

Built with commit 99ef02c

https://deploy-preview-4532--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit 5945d98

https://deploy-preview-4532--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Mar 14, 2018

Deploy preview for using-drupal ready!

Built with commit 99ef02c

https://deploy-preview-4532--using-drupal.netlify.com

@erquhart erquhart force-pushed the add-extract-plugin-helper branch 2 times, most recently from 438fb46 to 3947e8d Compare March 14, 2018 14:19
@erquhart
Copy link
Contributor Author

@KyleAMathews this PR will include the package for initial publishing, after that I'll put up a PR for implementing it in Gatsby's webpack config and the Sass plugin. We can give that a bit of time in case bugs surface before implementing in the remaining statically extracted style plugins.

@KyleAMathews
Copy link
Contributor

Nice! Will merge and publish so you can start on the implementation. Thanks for jumping into this!

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.

3 participants