Add optional file to precompile list

This commit is contained in:
Robin Ward 2020-01-10 15:14:32 -05:00
parent 556d66a97c
commit 72c3f36e58
1 changed files with 1 additions and 1 deletions

View File

@ -15,8 +15,8 @@ register_asset 'stylesheets/ie.scss'
# been activated so it can be uploaded to CDNs.
DiscourseEvent.on(:after_plugin_activation) do ||
polyfill_path = "#{Plugin::Instance.js_path}/#{self.directory_name}-optional.js"
puts polyfill_path
FileUtils.cp("#{Rails.root}/public/plugins/discourse-internet-explorer/js/ie.js", polyfill_path)
Rails.configuration.assets.precompile << "plugins/discourse-internet-explorer-optional.js"
end
after_initialize do