muxinc / strapi-plugin-mux-video-uploader

A Strapi plugin for managing uploads to Mux.
https://mux.com
23 stars 16 forks source link

adding details for enabling plugin in strapi. #58

Open sebscholl opened 1 year ago

erikpena commented 1 year ago

Hello @sebscholl ! Thank you for submitting this PR. I too had encountered this during the development of the plug-in. I believe this step is only needed if you are adding the plug-in through the plugins folder (not when you install via npm). It might be worthwhile to mention that and potentially add a link back to Strapi's docs for this configuration--

https://docs.strapi.io/dev-docs/configurations/plugins

sebscholl commented 1 year ago

Hey @erikpena - I believe the enablement of a plugin is always required. All plugins (unless developed locally) get installed using a package manager like NPM or Yarn. However, just installing the plugin doesn't enable it in your application. You must then go enable it as shown in the changes I submitted and provide any required config.

erikpena commented 1 year ago

Hey @sebscholl, thank you for the note. I just tried installing the plugin this last week and was able to use it without the config settings for this PR. The only thing that I really needed to do was delete the pre-compiled build directory that Strapi creates when it first launches. My guess here is that Strapi will skip over the plugin if the build directory already exists (I have an FAQ for this particular scenario)

sebscholl commented 1 year ago

Weird! Thanks for pointing this out. If the dependency is being auto-injected to the app, I'm unclear on what the enable key is there for.

However, if you're admin you is pre-built and, it's file components are directly importing the installed dependencies. Therefore, simply deleting the package and plugin config won't re-build the admin UI, and reinstalling the package will then give the built components access to the package files.

What makes sense to me, on a clean install is:

Install

  1. Empty project
  2. Install plugin (NPM)
  3. Enable plugin (plugins.js)
  4. Build Admin UI

Uninstall

  1. Uninstall plugin (NPM)
  2. Disable plugin (plugin.js)
  3. Build Admin UI