diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-28 15:39:20 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-28 15:39:20 +0000 |
commit | 6fd932d5a6c0bf57cbb87a3de5db70ae41fbbbd9 (patch) | |
tree | a0164a7ccf83a31673eedf7c293b72315863f18d | |
parent | f27536950fcc53bd4e4a74e323bcc88eb2ecb3a2 (diff) | |
download | gitlab-ce-6fd932d5a6c0bf57cbb87a3de5db70ae41fbbbd9.tar.gz |
Add docs for EE components in CE components
-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 |