diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-02-28 15:52:00 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-02-28 15:52:00 +0000 |
commit | 4df6460b4e3a5b1d2f383a37c9121bfbd59ea807 (patch) | |
tree | 09ab3dc97f5ffccabc8fe0d346a556af009b75bb | |
parent | d0011693129e410bf24e5af6b7a66ca4fe8c8fba (diff) | |
parent | 6fd932d5a6c0bf57cbb87a3de5db70ae41fbbbd9 (diff) | |
download | gitlab-ce-4df6460b4e3a5b1d2f383a37c9121bfbd59ea807.tar.gz |
Merge branch 'ee-component-docs' into 'master'
Add docs for EE components in CE components
See merge request gitlab-org/gitlab-ce!25649
-rw-r--r-- | doc/development/ee_features.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index 3e85c0e1995..3227c126e4f 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -880,6 +880,29 @@ 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. +## Vue code in `assets/javascript` + +To seperate Vue template differences we should async import the components. +Doing this allows for us to load the correct component in EE whilst in CE +we can load a empty component that renders nothing. This code **should** +exist in the CE repository as well as the EE repository. + +```html +<script> +export default { + components: { + EEComponent: () => import('ee_component/components/test.vue'), + }, +}; +</script> + +<template> + <div> + <ee-component /> + </div> +</template> +``` + ## SCSS code in `assets/stylesheets` To separate EE-specific styles in SCSS files, if a component you're adding styles for |