Skip to content

Commit

Permalink
fix: Transpile @AWS-SDK to ES5. (#363)
Browse files Browse the repository at this point in the history
* fix: Transpile @AWS-SDK to ES5.

* fix: Transform modules to cjs.
  • Loading branch information
qhanam authored Feb 24, 2023
1 parent f6b7bd7 commit f63150d
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 84 deletions.
163 changes: 83 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
},
"devDependencies": {
"@aws-sdk/client-rum": "^3.76.0",
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/preset-env": "~7.20.2",
"@playwright/test": "^1.21.1",
Expand All @@ -83,8 +84,8 @@
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react": "^7.31.8",
"http-server": "^14.1.1",
"generate-json-webpack-plugin": "^2.0.0",
"http-server": "^14.1.1",
"husky": "^8.0.1",
"jest": "^29.3.1",
"jest-date-mock": "^1.0.8",
Expand Down Expand Up @@ -145,6 +146,7 @@
]
},
"browserslist": [
"defaults"
"defaults",
"ie 11"
]
}
5 changes: 3 additions & 2 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const babelLoaderOptions = {
presets: [['@babel/preset-env', {}]],
plugins: [
'@babel/plugin-transform-modules-commonjs',
[
'@babel/plugin-transform-runtime',
{
Expand All @@ -26,15 +27,15 @@ module.exports = {
rules: [
{
test: [/\.js$/],
exclude: /node_modules/,
exclude: /node_modules\/(?!@aws-sdk)/,
use: {
loader: 'babel-loader',
options: babelLoaderOptions
}
},
{
test: [/\.ts$/],
exclude: /node_modules/,
exclude: /node_modules\/(?!@aws-sdk)/,
use: [
{
loader: 'babel-loader',
Expand Down

0 comments on commit f63150d

Please sign in to comment.