FEATURE: allows plugins to register no module files (#6664)

FEATURE: allows plugins to register no module files (#6664)

From 4546d8fbbf2ca4c80b827d99812b6e274356f9df Mon Sep 17 00:00:00 2001
From: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Date: Mon, 26 Nov 2018 09:01:28 +0100
Subject: [PATCH] FEATURE: allows plugins to register no module files (#6664)


diff --git a/lib/discourse_plugin_registry.rb b/lib/discourse_plugin_registry.rb
index 88197b0..da23d1c 100644
--- a/lib/discourse_plugin_registry.rb
+++ b/lib/discourse_plugin_registry.rb
@@ -139,7 +139,7 @@ class DiscoursePluginRegistry
     end
   end
 
-  JS_REGEX = /\.js$|\.js\.erb$|\.js\.es6$/
+  JS_REGEX = /\.js$|\.js\.erb$|\.js\.es6|\.js\.no-module\.es6$/
   HANDLEBARS_REGEX = /\.hbs$|\.js\.handlebars$/
 
   def self.register_asset(asset, opts = nil)

GitHub

2 Likes