Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade amazon-cognito-identity-json Webpack & other changes #11746

Merged
merged 5 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"babel-jest": "^24.9.0",
"babel-loader": "^8.3.0",
"codecov": "^3.6.5",
"compression-webpack-plugin": "^1.1.3",
jimblanc marked this conversation as resolved.
Show resolved Hide resolved
"husky": "^3.0.5",
"jest": "^24.x.x",
"jest-config": "24.8.0",
Expand All @@ -101,7 +100,6 @@
"typedoc": "^0.17.0",
"typescript": "~3.8.3",
"typescript-coverage-report": "^0.6.4",
"uglifyjs-webpack-plugin": "^0.4.6",
"uuid-validate": "^0.0.3",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.7.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/amazon-cognito-identity-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"genversion": "^2.2.0",
"react": "^16.0.0",
"rimraf": "^2.5.4",
"uglifyjs-webpack-plugin": "^1.0.0",
"webpack": "^3.5.5"
"terser-webpack-plugin": "^1.4.3",
"webpack": "^4.46.0",
"webpack-cli": "^4.10.0"
}
}
32 changes: 16 additions & 16 deletions packages/amazon-cognito-identity-js/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// version 3.11.0
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
// Webpack version: ^4.46.0
jimblanc marked this conversation as resolved.
Show resolved Hide resolved
const TerserPlugin = require('terser-webpack-plugin');

/* eslint-disable */
var webpack = require('webpack');
Expand Down Expand Up @@ -28,27 +27,28 @@ var config = {
crypto: 'crypto',
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default behavior, no longer needed.

new webpack.BannerPlugin({ banner, raw: true }),
new UglifyJsPlugin({
sourceMap: true,
include: /\.min\.js$/,
}),
new CompressionPlugin({
include: /\.min\.js$/,
}),
new webpack.BannerPlugin({ banner, raw: true })
],
optimization: {
minimizer: [
new TerserPlugin({
sourceMap: true,
jimblanc marked this conversation as resolved.
Show resolved Hide resolved
terserOptions: {
compress: true
jimblanc marked this conversation as resolved.
Show resolved Hide resolved
},
include: /\.min\.js$/,
})
]
},
mode: 'production',
module: {
rules: [
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
//{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
cacheDirectory: './node_modules/.cache/babel',
},
loader: 'babel-loader'
},
],
},
Expand Down
8 changes: 1 addition & 7 deletions packages/pushnotification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,12 @@
"devDependencies": {
"@types/jest": "^20.0.8",
"@types/node": "^8.10.15",
"awesome-typescript-loader": "^3.2.2",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"compression-webpack-plugin": "^1.1.3",
"find": "^0.2.7",
"json-loader": "^0.5.7",
"rimraf": "^2.6.2",
"source-map-loader": "^0.2.1",
"uglifyjs-webpack-plugin": "^0.4.6",
"webpack": "^3.5.5"
"rimraf": "^2.6.2"
},
"files": [
"lib",
Expand Down
Loading