Skip to content

Commit

Permalink
Upgrade scraper bundler to Webpack 4 and other dev deps (#926)
Browse files Browse the repository at this point in the history
* Upgrade Webpack to Webpack 4 and other dev deps

* Upgrade prettier
  • Loading branch information
taneliang authored Mar 9, 2018
1 parent 7fd67a0 commit 941d2b9
Show file tree
Hide file tree
Showing 3 changed files with 1,870 additions and 687 deletions.
28 changes: 14 additions & 14 deletions scrapers/nus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"private": true,
"dependencies": {
"babel-polyfill": "^6.16.0",
"babel-polyfill": "^6.26.0",
"bluebird": "^3.4.7",
"bunyan": "^1.8.5",
"cheerio": "^0.22.0",
Expand All @@ -50,26 +50,26 @@
"underscore.string": "^3.3.4"
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-core": "^6.25.0",
"babel-eslint": "^8.2.1",
"babel-jest": "^20.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-transform-object-rest-spread": "^6.19.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-jest": "^22.4.1",
"babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-bluebird": "^1.0.1",
"babel-preset-env": "^1.6.0",
"babel-preset-env": "^1.6.1",
"babel-preset-flow": "^6.23.0",
"babili-webpack-plugin": "^0.1.2",
"eslint": "^4.18.0",
"eslint": "^4.18.2",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-import-resolver-node": "^0.3.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-prettier": "^2.6.0",
"jest": "^20.0.4",
"jest": "^22.4.2",
"mock-fs": "^4.2.0",
"prettier": "^1.10.2",
"webpack": "^3.3.0",
"prettier": "^1.11.1",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.10",
"webpack-node-externals": "^1.6.0"
}
}
12 changes: 4 additions & 8 deletions scrapers/nus/webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @flow
import 'dotenv/config';
import * as webpack from 'webpack';
import { EnvironmentPlugin, type Configuration } from 'webpack';
import nodeExternals from 'webpack-node-externals';
import BabiliPlugin from 'babili-webpack-plugin';
import path from 'path';
import assert from 'assert';

Expand All @@ -11,7 +10,8 @@ delete process.env.BABEL_ENV;

assert.equal(process.env.NODE_ENV, 'production', 'Not compiling in production environment');

const config: webpack.Configuration = {
const config: Configuration = {
mode: process.env.NODE_ENV, // production
entry: './gulpfile.babel.js',
output: {
filename: 'gulpfile.compiled.js',
Expand All @@ -31,11 +31,7 @@ const config: webpack.Configuration = {
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new webpack.optimize.ModuleConcatenationPlugin(),
new BabiliPlugin(),
],
plugins: [new EnvironmentPlugin(['NODE_ENV'])],
target: 'node',
externals: [nodeExternals()],
};
Expand Down
Loading

0 comments on commit 941d2b9

Please sign in to comment.