Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
19b9af0abd07
Commit
3fadfb5a
authored
Feb 28, 2018
by
Mike Greiling
Browse files
remove the "test" bundle and apply it conditionally within main.js
parent
2aba3bbbb766
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/main.js
View file @
19b9af0a
...
...
@@ -36,8 +36,11 @@ import initBreadcrumbs from './breadcrumb';
import
initDispatcher
from
'
./dispatcher
'
;
// eslint-disable-next-line global-require, import/no-commonjs
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
// inject test utilities if necessary
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
&&
gon
&&
gon
.
test_env
)
{
$
.
fx
.
off
=
true
;
import
(
/* webpackMode: "eager" */
'
./test_utils/
'
);
}
svg4everybody
();
...
...
app/assets/javascripts/test.js
deleted
100644 → 0
View file @
2aba3bbb
$
.
fx
.
off
=
true
;
app/views/layouts/_head.html.haml
View file @
19b9af0a
...
...
@@ -42,7 +42,6 @@
=
webpack_bundle_tag
"common"
=
webpack_bundle_tag
"main"
=
webpack_bundle_tag
"raven"
if
Gitlab
::
CurrentSettings
.
clientside_sentry_enabled
=
webpack_bundle_tag
"test"
if
Rails
.
env
.
test?
-
if
content_for?
(
:page_specific_javascripts
)
=
yield
:page_specific_javascripts
...
...
config/webpack.config.js
View file @
19b9af0a
...
...
@@ -56,7 +56,6 @@ function generateEntries() {
main
:
'
./main.js
'
,
ide
:
'
./ide/index.js
'
,
raven
:
'
./raven/index.js
'
,
test
:
'
./test.js
'
,
webpack_runtime
:
'
./webpack.js
'
,
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment