Skip to content

Commit 0f57ea5

Browse files
committed
chore(webpack): upgrade webpack to 4
Found out that the default webpack works just fine for us, and specify and entry point actually creates an error. This is the advised usage on https://github.com/webpack-contrib/karma-webpack
1 parent a06a075 commit 0f57ea5

File tree

5 files changed

+5
-38
lines changed

5 files changed

+5
-38
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
"karma-jasmine": "^1.0.2",
3838
"karma-phantomjs-launcher": "^1.0.2",
3939
"karma-threshold-reporter": "^0.1.15",
40-
"karma-webpack": "^1.8.0",
40+
"karma-webpack": "^4.0.2",
4141
"lodash": "^4.16.4",
4242
"phantomjs-prebuilt": "^2.1.13",
4343
"plato": "^1.7.0",
4444
"run-browser": "^2.0.2",
4545
"semantic-release": "^6.3.0",
4646
"standard": "^8.4.0",
4747
"tape": "^4.6.2",
48-
"webpack": "^1.13.2"
48+
"webpack": "^4.43.0"
4949
},
5050
"scripts": {
5151
"coverage:upload": "cat build/coverage/lcov.info | coveralls",

test/webpack/app.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/webpack/karma.conf.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* @since 9/11/16.
99
*/
1010

11-
var webpackConfig = require('./webpack.conf');
12-
1311
module.exports = function(config) {
1412
'use strict';
1513
config.set({
@@ -30,10 +28,10 @@ module.exports = function(config) {
3028
}],
3129

3230
// webpack configuration
33-
webpack: webpackConfig,
31+
webpack: {},
3432

3533
// webpack middlewae configuration
36-
webpackMiddleware: { noInfo: true },
34+
webpackMiddleware: { stats: 'errors-only' },
3735

3836
// list of files to exclude
3937
exclude: [],

test/webpack/webpack.conf.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

test/webpack/webpack.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('webpack require', function () {
1616
}
1717

1818
it('should throw an error if the module is not defined', function () {
19-
expect(loadDateTimeInput).toThrow();
19+
expect(loadDateTimeInput).toThrowError(/\[\$injector:nomod\] Module 'ui\.dateTimeInput'/);
2020
});
2121

2222
it('should be available when required', function () {

0 commit comments

Comments
 (0)