From 00d30969c04cec82cf5951f3f4a97fe2303e031e Mon Sep 17 00:00:00 2001 From: Pablo Lacerda de Miranda Date: Fri, 4 May 2018 10:37:46 -0700 Subject: [PATCH] adds webpack 4 support --- .travis.yml | 3 +-- package.json | 6 +++--- test/test.js | 8 +++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef3b144..7378d9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - - '4' - '6' - '8' - 'node' - + diff --git a/package.json b/package.json index c1ebd4f..c0e9458 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "http://dontkry.com" }, "engines": { - "node": ">= 0.10.0" + "node": ">= 6.11.5" }, "scripts": { "test": "semistandard && node test/test.js" @@ -26,15 +26,15 @@ ] }, "dependencies": { - "supports-color": "^5.3.0", "fancy-log": "^1.3.2", "lodash.clone": "^4.3.2", "lodash.some": "^4.2.2", "memory-fs": "^0.4.1", "plugin-error": "^1.0.1", + "supports-color": "^5.3.0", "through": "^2.3.8", "vinyl": "^2.1.0", - "webpack": "^3.4.1" + "webpack": "^4.7.0" }, "devDependencies": { "gulp": "^3.9.0", diff --git a/test/test.js b/test/test.js index 76f384c..c795a2c 100644 --- a/test/test.js +++ b/test/test.js @@ -11,6 +11,7 @@ test('streams output assets', function (t) { var entry = fs.src('test/fixtures/entry.js'); var stream = webpack({ config: { + mode: 'development', output: { filename: 'bundle.js' } @@ -37,6 +38,7 @@ test('multiple entry points', function (t) { t.plan(3); var stream = webpack({ config: { + mode: 'development', entry: { 'one': path.join(base, 'entry.js'), 'two': path.join(base, 'anotherentrypoint.js') @@ -67,7 +69,9 @@ test('stream multiple entry points', function (t) { t.plan(3); var entries = fs.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']); var stream = webpack({ - config: {}, + config: { + mode: 'development' + }, quiet: true }); stream.on('data', function (file) { @@ -113,6 +117,7 @@ test('multi-compile', function (t) { var stream = webpack({ quiet: true, config: [{ + mode: 'development', entry: { 'one': path.join(base, 'entry.js') }, @@ -120,6 +125,7 @@ test('multi-compile', function (t) { filename: '[name].bundle.js' } }, { + mode: 'development', entry: { 'two': path.join(base, 'anotherentrypoint.js') },