Commit e858582f authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 7e3618ae 4df6460b
......@@ -40,8 +40,7 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
// Jest is running in node environment
if (BABEL_ENV === 'jest') {
plugins.push('transform-es2015-modules-commonjs');
plugins.push('dynamic-import-node');
plugins.push('@babel/plugin-transform-modules-commonjs');
}
module.exports = { presets, plugins };
......@@ -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
......
......@@ -29,7 +29,7 @@ module.exports = {
cacheDirectory: '<rootDir>/tmp/cache/jest',
modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'],
reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
setupFilesAfterEnv: ['<rootDir>/spec/frontend/test_setup.js'],
restoreMocks: true,
transform: {
'^.+\\.(gql|graphql)$': 'jest-transform-graphql',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment