Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
f5f0be53
Commit
f5f0be53
authored
Mar 02, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove problematic plugins from karma's webpack config
parent
59f51cbf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
config/karma.config.js
config/karma.config.js
+12
-1
No files found.
config/karma.config.js
View file @
f5f0be53
var
path
=
require
(
'
path
'
);
var
path
=
require
(
'
path
'
);
var
webpack
=
require
(
'
webpack
'
);
var
webpackConfig
=
require
(
'
./webpack.config.js
'
);
var
webpackConfig
=
require
(
'
./webpack.config.js
'
);
var
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'
..
'
);
var
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'
..
'
);
// add coverage instrumentation to babel config
// add coverage instrumentation to babel config
if
(
webpackConfig
&&
webpackConfig
.
module
&&
webpackConfig
.
module
.
rules
)
{
if
(
webpackConfig
.
module
&&
webpackConfig
.
module
.
rules
)
{
var
babelConfig
=
webpackConfig
.
module
.
rules
.
find
(
function
(
rule
)
{
var
babelConfig
=
webpackConfig
.
module
.
rules
.
find
(
function
(
rule
)
{
return
rule
.
loader
===
'
babel-loader
'
;
return
rule
.
loader
===
'
babel-loader
'
;
});
});
...
@@ -13,6 +14,16 @@ if (webpackConfig && webpackConfig.module && webpackConfig.module.rules) {
...
@@ -13,6 +14,16 @@ if (webpackConfig && webpackConfig.module && webpackConfig.module.rules) {
babelConfig
.
options
.
plugins
.
push
(
'
istanbul
'
);
babelConfig
.
options
.
plugins
.
push
(
'
istanbul
'
);
}
}
// remove problematic plugins
if
(
webpackConfig
.
plugins
)
{
webpackConfig
.
plugins
=
webpackConfig
.
plugins
.
filter
(
function
(
plugin
)
{
return
!
(
plugin
instanceof
webpack
.
optimize
.
CommonsChunkPlugin
||
plugin
instanceof
webpack
.
DefinePlugin
);
});
}
// Karma configuration
// Karma configuration
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
)
{
var
progressReporter
=
process
.
env
.
CI
?
'
mocha
'
:
'
progress
'
;
var
progressReporter
=
process
.
env
.
CI
?
'
mocha
'
:
'
progress
'
;
...
...
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