netlify-cms-yoast-seo icon indicating copy to clipboard operation
netlify-cms-yoast-seo copied to clipboard

Not possible to import YOAST with npm

Open chrfritsch opened this issue 5 years ago • 4 comments

Would like to use this widget in my gatsby/netlify-cms site, but I can not include YOAST over the js import command in my preview template.

chrfritsch avatar Aug 12 '19 11:08 chrfritsch

i had the sabe problem

ammarax avatar Sep 23 '19 08:09 ammarax

Would either of you be interested in adding a PR for this?

crgeary avatar Sep 23 '19 08:09 crgeary

Not sure exactly what you mean by "include YOAST over the js import command" but right now YOAST is added to window object. I agree that exporting YOAST is better so I made this PR https://github.com/indigotree/netlify-cms-yoast-seo/pull/6

Currently to use YOAST you'd have to do this

import 'netlify-cms-yoast-seo/dist/main.js';
const YOAST = window.YOAST;
...

mihaildu avatar Sep 30 '19 10:09 mihaildu

so, there isn't any integration with npm?

ammarax avatar Oct 02 '19 14:10 ammarax