-
Notifications
You must be signed in to change notification settings - Fork 305
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
Upgrade to Gatsby WordPress source and gatsby ^v3 #77
base: main
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/imranhsayed/gatsby-woocommerce-themes/9pPAoLENuZVuUJFVFq1HqQXDC8qn [Deployment for f49a6c3 failed] |
By adjusting the /**
* Since the node_modules ( packages ) live outside the theme directory, making an alias for them.
*
* So Gutenberg styles can be accessed like so `@import "~@wordpress/base-styles/colors"`
*
* @param stage
* @param actions
*/
exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
actions.setWebpackConfig({
resolve: {
alias: {
'~': path.resolve(__dirname, '../../node_modules')
}
},
});
const config = getConfig()
const miniCssExtractPlugin = config.plugins.find(
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin'
)
if (miniCssExtractPlugin) {
miniCssExtractPlugin.options.ignoreOrder = true
}
actions.replaceWebpackConfig(config)
}; |
gatsby-source-wordpress-experimental
togatsby-source-wordpress
v2 to v3
Mini css extract plugin Issues
CSS Problem after build, but not in development' environment. (chunk styles [mini-css-extract-plugin] Conflicting order.) gatsbyjs/gatsby#26486
New version 0.4.2 capture lot of warnings webpack-contrib/mini-css-extract-plugin#250 (comment)
New version 0.4.2 capture lot of warnings webpack-contrib/mini-css-extract-plugin#250
You can check to see what is using it by running
yarn why mini-css-extract-plugin
Possible solution to be tested, update the MiniCSSExtract plugin config in
gatsby-node.js
, as custom config