Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Update webpack deps (#2310)
Browse files Browse the repository at this point in the history
Summary:
**Summary**

This diff update build-related deps. We were creating more than one instance of `webpack-stream`, which is an error on the latest one, so I fix that too.

**Test Plan**

build && playground example
Pull Request resolved: #2310

Differential Revision: D19598315

Pulled By: mrkev

fbshipit-source-id: 5430f96576cadbd4f16b5a597dc77b9cc026d002
  • Loading branch information
mrkev authored and facebook-github-bot committed Jan 28, 2020
1 parent 963e312 commit 0131e1d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
26 changes: 15 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,26 @@

'use strict';

var babel = require('gulp-babel');
var packageData = require('./package.json');
var moduleMap = require('./scripts/module-map');
var fbjsConfigurePreset = require('babel-preset-fbjs/configure');
var del = require('del');
var gulpCheckDependencies = require('fbjs-scripts/gulp/check-dependencies');
var gulp = require('gulp');
var babel = require('gulp-babel');
var cleanCSS = require('gulp-clean-css');
var concatCSS = require('gulp-concat-css');
var derequire = require('gulp-derequire');
var flatten = require('gulp-flatten');
var gulp = require('gulp');
var gulpif = require('gulp-if');
var gulpUtil = require('gulp-util');
var header = require('gulp-header');
var packageData = require('./package.json');
var gulpif = require('gulp-if');
var rename = require('gulp-rename');
var gulpUtil = require('gulp-util');
var StatsPlugin = require('stats-webpack-plugin');
var through = require('through2');
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var webpackStream = require('webpack-stream');

var fbjsConfigurePreset = require('babel-preset-fbjs/configure');
var gulpCheckDependencies = require('fbjs-scripts/gulp/check-dependencies');

var moduleMap = require('./scripts/module-map');

var paths = {
dist: 'dist',
lib: 'lib',
Expand Down Expand Up @@ -70,7 +68,12 @@ var COPYRIGHT_HEADER = `/**
*/
`;

var wpStream = null;

var buildDist = function(opts) {
if (wpStream !== null) {
return wpStream;
}
var webpackOpts = {
externals: {
immutable: {
Expand Down Expand Up @@ -114,14 +117,15 @@ var buildDist = function(opts) {
if (!opts.debug) {
webpackOpts.plugins.push(new UglifyJsPlugin());
}
return webpackStream(webpackOpts, null, function(err, stats) {
wpStream = webpackStream(webpackOpts, null, function(err, stats) {
if (err) {
throw new gulpUtil.PluginError('webpack', err);
}
if (stats.compilation.errors.length) {
gulpUtil.log('webpack', '\n' + stats.toString({colors: true}));
}
});
return wpStream;
};

gulp.task(
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"gulp-flatten": "^0.4.0",
"gulp-header": "^2.0.9",
"gulp-if": "^3.0.0",
"gulp-rename": "^1.4.0",
"gulp-rename": "2",
"gulp-util": "^3.0.6",
"jest": "^24.9.0",
"prettier": "1.19.1",
Expand All @@ -80,8 +80,8 @@
"react-test-renderer": "^16.0.0",
"stats-webpack-plugin": "^0.6.2",
"through2": "^3.0.1",
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack-stream": "^4.0.0"
"uglifyjs-webpack-plugin": "2",
"webpack-stream": "5.2.1"
},
"devEngines": {
"node": "10.x || 12.x || 13.x",
Expand Down

0 comments on commit 0131e1d

Please sign in to comment.