From 8cb35d72137797fb3c48c6099bb04172c3af3fbf Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Thu, 5 Sep 2019 16:27:16 -0400 Subject: [PATCH] Update dependencies to fix support for Safari 10.1 --- package.json | 34 ++++++++++++++++++---------------- src/configure.js | 20 +++++++++++++++++--- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index de6073a..2c52370 100644 --- a/package.json +++ b/package.json @@ -31,32 +31,34 @@ "eslint": "^4.16.0", "eslint-config-developit": "^1.1.1", "microbundle": "^0.11.0", - "webpack": "^4.14.0", - "workerize-loader": "^1.0.4" + "webpack": "^4.39.3", + "workerize-loader": "^1.1.0" }, "dependencies": { - "@babel/core": "^7.4.3", - "@babel/plugin-proposal-object-rest-spread": "^7.4.3", + "@babel/core": "^7.5.5", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", "@babel/plugin-transform-react-jsx": "^7.3.0", - "@babel/polyfill": "^7.4.3", - "@babel/preset-env": "^7.4.3", + "@babel/polyfill": "^7.4.4", + "@babel/preset-env": "^7.5.5", "@babel/preset-stage-0": "^7.0.0", - "babel-loader": "^8.0.5", - "babel-plugin-istanbul": "^5.1.0", + "babel-loader": "^8.0.6", + "babel-plugin-istanbul": "^5.2.0", "chalk": "^2.3.0", - "dlv": "^1.1.1", + "dlv": "^1.1.3", + "istanbul-instrumenter-loader": "^3.0.1", "jasmine-core": "^3.3.0", - "karma": "^3.1.1", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.2", - "karma-firefox-launcher": "^1.1.0", + "karma": "^4.3.0", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage": "^2.0.1", + "karma-firefox-launcher": "^1.2.0", "karma-jasmine": "^2.0.1", "karma-sauce-launcher": "^2.0.2", "karma-sourcemap-loader": "^0.3.7", "karma-spec-reporter": "0.0.32", - "karma-webpack": "^2.0.13", - "puppeteer": "^1.0.0", - "sade": "^1.3.1", + "karma-webpack": "^4.0.2", + "minimatch": "^3.0.4", + "puppeteer": "^1.19.0", + "sade": "^1.6.1", "script-loader": "^0.7.2" }, "peerDependencies": { diff --git a/src/configure.js b/src/configure.js index b9a5417..2a450d1 100644 --- a/src/configure.js +++ b/src/configure.js @@ -5,6 +5,7 @@ import delve from 'dlv'; import { tryRequire, dedupe, cleanStack, readFile, readDir } from './lib/util'; import babelLoader from './lib/babel-loader'; import cssLoader from './lib/css-loader'; +// import minimatch from 'minimatch'; const WEBPACK_VERSION = String(require('webpack').version || '3.0.0'); const WEBPACK_MAJOR = parseInt(WEBPACK_VERSION.split('.')[0], 10); @@ -241,7 +242,15 @@ export default function configure(options) { module: { // @TODO check webpack version and use loaders VS rules as the key here appropriately: rules: loaders.concat( - !getLoader( rule => `${rule.use},${rule.loader}`.match(/\bbabel-loader\b/) ) && babelLoader(options), + !getLoader( rule => `${rule.use},${rule.loader}`.match(/\bbabel-loader\b/) ) ? ( + babelLoader(options) + ) : false /*({ + test: /\.[tj]sx?$/, + // include: files.map(f => minimatch.filter(f, { matchBase: true })), + exclude: /node_modules/, + enforce: 'pre', + loader: require.resolve('istanbul-instrumenter-loader') + })*/, !getLoader('foo.css') && cssLoader(options) ).filter(Boolean) }, @@ -269,11 +278,16 @@ export default function configure(options) { let name = plugin && plugin.constructor.name; return /^\s*(UglifyJS|HTML|ExtractText|BabelMinify)(.*Webpack)?Plugin\s*$/gi.test(name); }), - node: webpackProp('node', {}) + node: webpackProp('node', {}), + performance: { + hints: false + } }, webpackMiddleware: { - noInfo: true + noInfo: true, + logLevel: 'error', + stats: 'errors-only' }, colors: true,