Hey there!
I’m having some issues creating my own custom plugin for my organization’s Foreman.
First, when following the guide to install the template, I’m getting the following error when trying to access my Foreman instance:
6f1a3979 | ActionView::Template::Error (Can't find entry point 'my_plugin_name' in webpack manifest):
6f1a3979 | 13: <%= stylesheet_link_tag *webpack_asset_paths('foreman-vendor', :extension => 'css') %>
6f1a3979 | 14: <%= stylesheet_link_tag *webpack_asset_paths('bundle', :extension => 'css') %>
6f1a3979 | 15: <%= stylesheet_link_tag 'application' %>
6f1a3979 | 16: <%= webpacked_plugins_with_global_css %>
6f1a3979 | 17: <%= yield(:stylesheets) %>
6f1a3979 | 18:
6f1a3979 | 19: <%= csrf_meta_tags %>
Second, I’d like to reskin Forman without maintaining a fork. The best approach seems to be creating a plugin that could override files under app/assets
and webpack/assets
I’ve tried to use existing, but out of date, plugins like foreman-theme
and foreman-themify
as examples and replicate how they replace things like stylesheets and images. By modifying the plugin templates engine.rb
to do things like precompile assets I’ve made the following observations:
- When I install the plugin into foreman and start the app, it says my assets are outside of the foreman namespace and will be ignored.
- Assets with the same name will not be overriden. I suspect fingerprinting to contribute to this.
- Assets can be seen, but they aren’t at the correct path.
[localhost:3000/assets/logo.png](http://localhost:3000/assets/logo.png)
will point to the foreman logo, but/assets/images/logo.png
will point to the logo from my plugin.
I’ve also tried using /public
and /vendor
folders to no avail. I haven’t even tried overriding webpack
yet.