-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Made gatsby-plugin-netlify-cms work with gatsby v2 #6292
Conversation
Deploy preview for using-drupal ready! Built with commit 3b9de63 |
Deploy preview for gatsbygram ready! Built with commit 3b9de63 |
Great work. It's worth tagging #6048 |
Awesome work @emanueleperuffo - I am also blocked from completing my V2 upgrade because of this issue. |
@@ -1,15 +1,16 @@ | |||
{ | |||
"name": "gatsby-plugin-netlify-cms", | |||
"description": "A Gatsby plugin which generates the Netlify CMS single page app", | |||
"version": "2.0.0-beta.3", | |||
"version": "2.2.0-beta.15", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change? Versioning will be handled during the release process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff, thanks @emanueleperuffo!
It looks like extract-text-webpack-plugin
shouldn't be used for CSS anymore. See the usage note at https://github.com/webpack-contrib/extract-text-webpack-plugin#usage.
The mini-css-extract-plugin
should be used instead.
Could you update this PR to use that instead?
"author": "Shawn Erquhart <shawn@erquh.art>", | ||
"bugs": { | ||
"url": "https://github.com/gatsbyjs/gatsby/issues" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "7.0.0-beta.51", | ||
"extract-text-webpack-plugin": "^4.0.0-beta.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/webpack-contrib/extract-text-webpack-plugin#usage
⚠️ Since webpack v4 the extract-text-webpack-plugin should not be used for css. Use mini-css-extract-plugin instead.
@m-allanson I've moved to mini-css-extract-plugin and reverted back the version number. |
I tested it. Seems to be working ok. However I'm seeing FOUC when I load the admin page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I'll merge and release this now. Could someone investigate the FOUC issue @donysukardi saw and fix that? |
Tried |
I see. And I also noticed that the css is injected in 2 separate but
apparently identical files.
…On Sat., 7 Jul. 2018, 8:06 am Josh Cuneo, ***@***.***> wrote:
Having the same issue as @steverandy <https://github.com/steverandy>.
Looks like maybe the Identity widget isn't being injected when the plugin
generates the index.html?
`
<title>Content Manager</title> <script type="text/javascript"
src="/cms-f3360073949bf65e6d32.js"></script> `
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6292 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE2XZekgpTRLKj-d7yEEhkYWagufUpVLks5uEE_-gaJpZM4VCZSV>
.
|
@steverandy The default export of netlify-identity-widget is undefined for gatsby build, but not for gatsby develop... I don't know how to fix this... |
I happened to have a similar issue. I'm not sure why it behaves like this. |
Also, I've found this in my production pages (not /admin):
I think that the code in cms.js goes to the main entry instead of the cms entry in this case... |
Looking into this (all of the above) now. |
I've created a new pr #6341 |
Hiya @emanueleperuffo! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
I've made gatsby-plugin-netlify-cms work with gatsby v2.
I've not used webpack-merge because I couldn't get something working in a reasonable amount of time and I didn't have too much time to learn it, so I've ended up using vanilla JavaScript.