-
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
gatsby-plugin-netlify-cms V3 version #8662
Comments
I have done a quick hack... by adding this in gatsby node (of the plugin..) const loadPackage = require("load-pkg-config");
...
/**
* Auto generate CMS index.html page.
*/
new _htmlWebpackPlugin.default({
title: htmlTitle,
version: loadPackage("netlify-cms").version,
template: __dirname + "/index.html",
excludeAssets: [/cms.css/]
}), with the html template <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
</head>
<body>
<script type="text/javascript" src="cms.js?<%= htmlWebpackPlugin.options.version %>"></script>
</body>
</html> The result is like this, dont know why <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>
Content Manager
</title>
</head>
<body>
<script type="text/javascript" src="cms.js?2.1.2"></script>
<script type="text/javascript" src="cms.js"></script>
</body>
</html> |
@pungggi |
I think I tried |
Sure, we always welcome community contributions! |
The CMS plugin runs it's own webpack build. It doesn't impact the performance of the main site, so I wouldn't be concerned with caching here. |
hi @erquhart, the concern is about the Client getting the updated Version in case the cms.js is updated. |
Ah, okay. I've never heard of anyone having an issue with this using Netlify CMS, have you? If so the fix makes sense, I'd at least say we should use a valid query parameter and say |
Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open! |
Yes, the User needs to Force reload when a new release is out. Has anyone else seen this? |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m Thanks again for being part of the Gatsby community! |
Because we are encouraged to cache also the Javascript Files this Html output should include version of the cms:
Example:
The text was updated successfully, but these errors were encountered: