Updating front-end dependencies (#2167)

* update to webpack 5

* update babel

* update eslint

* update cheerio

* update npm min to v7

* revert engine change

* generate package lock with npm v6 (lockfileVersion 1)

* add region to test setup

* update blueprint popover2

* tabindex changes due to blueprint popover2 revision

* update snapshots

* update lodash and pako

* fix typo

* fix lodash refactoring

* more lodash refactoring

* update babel and blueprintjs

* update jest support packages

* update puppeteer

* update regl

* update react-icons and react-helmet

* update react and react-dom
This commit is contained in:
Bruce Martin
2021-04-21 07:23:31 -07:00
committed by GitHub
parent e2ce9a90ca
commit 99a795a688
27 changed files with 4898 additions and 28029 deletions
@@ -31,7 +31,7 @@ const devConfig = {
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2|otf)$/i,
loader: "file-loader",
include: [nodeModules, fonts],
query: {
options: {
name: "static/assets/[name].[ext]",
// (thuang): This is needed to make sure @font url path is '/static/assets/'
publicPath: "/",
@@ -67,14 +67,19 @@ const devConfig = {
__REACT_DEVTOOLS_GLOBAL_HOOK__: "({ isDisabled: true })",
}),
new webpack.DefinePlugin({
"process.env.CXG_SERVER_PORT": JSON.stringify(
process.env.CXG_SERVER_PORT
),
// webpack 5 no longer polyfills NodeJS modules, so fake the one we need
"process.env": JSON.stringify({
NODE_ENV: process.env.NODE_ENV || "development",
CXG_SERVER_PORT: process.env.CXG_SERVER_PORT || "5005",
}),
}),
new ScriptExtHtmlWebpackPlugin({
async: "obsolete",
}),
],
infrastructureLogging: {
level: "warn",
},
};
module.exports = merge(sharedConfig, devConfig);
@@ -1,4 +1,5 @@
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const TerserJSPlugin = require("terser-webpack-plugin");
@@ -45,7 +46,7 @@ const prodConfig = {
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2|otf)$/i,
loader: "file-loader",
include: [nodeModules, fonts],
query: {
options: {
name: "static/assets/[name]-[contenthash].[ext]",
// (thuang): This is needed to make sure @font url path is '../static/assets/'
publicPath: "static/",
@@ -86,6 +87,12 @@ const prodConfig = {
new CspHashPlugin({
filename: "csp-hashes.json",
}),
new webpack.DefinePlugin({
// webpack 5 no longer polyfills NodeJS modules, so fake the one we need
"process.env": JSON.stringify({
NODE_ENV: "production",
}),
}),
],
performance: {
maxEntrypointSize: 2000000,
@@ -41,7 +41,7 @@ module.exports = {
loader: "css-loader",
options: {
modules: {
localIdentName: "[name]__[local]___[hash:base64:5]",
localIdentName: "[name]__[local]___[contenthash:base64:5]",
},
importLoaders: 1,
},