diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-12-20 17:20:51 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-12-20 17:20:51 -0600 |
commit | 0e50e9d9d48752a58b640064075f7786f86e7433 (patch) | |
tree | bb18561ca7c0f584cf001462fca502845685bbab | |
parent | 58b8b80787c47185bbca59bbb2039c2ba9022d27 (diff) | |
download | gitlab-ce-0e50e9d9d48752a58b640064075f7786f86e7433.tar.gz |
update dispatcher to allow for dynamic imports until webpack plugin is updatedfix-webpack-chunk-naming
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/users/show/index.js | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 62867c56214..13fa553047a 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -111,6 +111,8 @@ import Activities from './activities'; return false; } + const fail = () => Flash('Error loading dynamic module'); + path = page.split(':'); shortcut_handler = null; @@ -545,7 +547,7 @@ import Activities from './activities'; new CILintEditor(); break; case 'users:show': - new UserCallout(); + import('./pages/users/show').then(m => m.default()).catch(fail); break; case 'admin:conversational_development_index:show': new UserCallout(); diff --git a/app/assets/javascripts/pages/users/show/index.js b/app/assets/javascripts/pages/users/show/index.js new file mode 100644 index 00000000000..f18f98b4e9a --- /dev/null +++ b/app/assets/javascripts/pages/users/show/index.js @@ -0,0 +1,3 @@ +import UserCallout from '~/user_callout'; + +export default () => new UserCallout(); |