summaryrefslogtreecommitdiff
path: root/doc/development/ee_features.md
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-01-30 14:02:44 +0000
committerWinnie Hellmann <winnie@gitlab.com>2019-01-30 14:02:44 +0000
commit9d57d50a4f531a09b5377e2b6a40e4a61ee2cfd4 (patch)
tree2c409da6b13adbf60687a2e2982f2dd6899e9761 /doc/development/ee_features.md
parent143975841cc47ce775e6b0d8c58517953cfc92fa (diff)
downloadgitlab-ce-9d57d50a4f531a09b5377e2b6a40e4a61ee2cfd4.tar.gz
Document ee_else_ce alias for splitting CE/EE JavaScript
Diffstat (limited to 'doc/development/ee_features.md')
-rw-r--r--doc/development/ee_features.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index 790b1bf951b..e0985922443 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -839,6 +839,20 @@ For example there can be an
`app/assets/javascripts/protected_branches/protected_branches_bundle.js` and an
EE counterpart
`ee/app/assets/javascripts/protected_branches/protected_branches_bundle.js`.
+The corresponding import statement would then look like this:
+
+```javascript
+// app/assets/javascripts/protected_branches/protected_branches_bundle.js
+import bundle from '~/protected_branches/protected_branches_bundle.js';
+
+// ee/app/assets/javascripts/protected_branches/protected_branches_bundle.js
+// (only works in EE)
+import bundle from 'ee/protected_branches/protected_branches_bundle.js';
+
+// in CE: app/assets/javascripts/protected_branches/protected_branches_bundle.js
+// in EE: ee/app/assets/javascripts/protected_branches/protected_branches_bundle.js
+import bundle from 'ee_else_ce/protected_branches/protected_branches_bundle.js';
+```
See the frontend guide [performance section](./fe_guide/performance.md) for
information on managing page-specific javascript within EE.