After adding gatsby-plugin-netlify-cms to gatsby project generated html files doesn't include scripts and are running without javascript. chunk-map.json file is overridden with chunks generated by plugin's webpack build and looks like this: {"cms":["/cms.js"]}.
https://github.com/asistapl/gatsby-plugin-netlify-cms-bug
I created that repository with these steps:
gatsby new gatsby-plugin-netlify-cms-bugcd gatsby-plugin-netlify-cms-bugyarn add netlify-cms gatsby-plugin-netlify-cmsgatsby-config.jsTo see a bug follow these steps:
git clone https://github.com/asistapl/gatsby-plugin-netlify-cms-bugcd gatsby-plugin-netlify-cms-bugyarn installgatsby build - It's a first build and it sometimes work at that momentgatsby build again - now bug should be visible, because gatsby is winning a race thanks to cache.gatsby serve and check if scripts are runningchunk-map.json file and see that it includes only chunks generated by the plugin.I tried to:
package.json and even gatsby-cli.gatsby-config.js.It didn't fixed the problem.
Plugin shouldn't change Gatsby's build output.
Plugin overrode Gatsby's build output.
System:
OS: macOS 10.14.2
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.2.0 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 71.0.3578.98
Firefox: 64.0.2
Safari: 12.0.2
npmPackages:
gatsby: ^2.0.98 => 2.0.98
gatsby-image: ^2.0.28 => 2.0.28
gatsby-plugin-manifest: ^2.0.13 => 2.0.13
gatsby-plugin-netlify-cms: ^3.0.10 => 3.0.10
gatsby-plugin-offline: ^2.0.21 => 2.0.21
gatsby-plugin-react-helmet: ^3.0.5 => 3.0.5
gatsby-plugin-sharp: ^2.0.18 => 2.0.18
gatsby-source-filesystem: ^2.0.17 => 2.0.17
gatsby-transformer-sharp: ^2.1.12 => 2.1.12
npmGlobalPackages:
gatsby-cli: 2.4.8
Thank you for reporting this @asistapl
We have a fix ready in a PR and we'll comment on this again once released!
@sidharthachatterjee Thank you very much! You made my day 馃帀
[email protected] and [email protected] were released with fixes - please update both