Skip to content

Commit

Permalink
fix(browser): presets dont support ie10 (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyie committed Sep 17, 2020
1 parent ca287ba commit 28dd95d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

16 changes: 14 additions & 2 deletions browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,20 @@ function build(options, callback) {
browserify(brOpts).add('./lib/browser.js')
.transform(babelify, {
"global": true,
"presets": ["es2015"],
"plugins": ["transform-runtime", "babel-plugin-transform-regenerator", "babel-plugin-transform-es2015-modules-commonjs"],
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3,
"targets": {
"chrome": "58",
"ie": "10"
}
}
],
],
"plugins": ["@babel/plugin-transform-runtime", "@babel/plugin-transform-regenerator"],
"only": ['lib/*', 'shims/*', 'shims/crypto/*'],
}).transform(aliasify, {
global: true,
Expand Down
1 change: 1 addition & 0 deletions example/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,22 @@
},
"homepage": "https://github.com/aliyun/oss-nodejs-sdk",
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/plugin-transform-regenerator": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/runtime": "^7.11.2",
"@types/node": "^14.0.12",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"aliasify": "^2.0.0",
"autod": "^2.6.1",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.8.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"babel-runtime": "^6.6.1",
"babelify": "^7.3.0",
"babelify": "^10.0.0",
"beautify-benchmark": "^0.2.4",
"benchmark": "^2.1.1",
"bluebird": "^3.1.5",
"browserify": "^13.3.0",
"browserify": "^16.5.2",
"core-js": "^3.6.5",
"co-fs": "^1.2.0",
"co-mocha": "^1.2.1",
"crypto-js": "^3.1.9-1",
Expand Down

0 comments on commit 28dd95d

Please sign in to comment.