From 583efbc9c4751605f63b5ec181e3328900c93b85 Mon Sep 17 00:00:00 2001 From: Adrian Oprea Date: Tue, 16 Jan 2018 17:19:56 +0200 Subject: [PATCH] refactor(componentLoader): Add component path at module level Instead of forcing this knowledge on the add-on, we inserted it here. The benefit is that we are able to point the core to whatever directory we choose, without modifying each addon in turn. --- app/javascript/src/componentLoader/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/javascript/src/componentLoader/index.js b/app/javascript/src/componentLoader/index.js index 87e546305..33aa12c08 100644 --- a/app/javascript/src/componentLoader/index.js +++ b/app/javascript/src/componentLoader/index.js @@ -1,6 +1,5 @@ import { createLoader } from 'react-hijack'; -const componentLoader = createLoader((module) => import('' + module)); +const componentLoader = createLoader((module) => import('./components/' + module)); export default componentLoader; -