Skip to content

Commit

Permalink
add polyfill and other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-mitra committed Sep 8, 2020
1 parent 88345ef commit c76c4f9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@
"after": "^0.8.2",
"auto-changelog": "^1.16.2",
"babel-eslint": "^10.1.0",
"babel-polyfill": "^6.26.0",
"btoa": "^1.2.1",
"camelcase": "^6.0.0",
"component-cookie": "^1.1.4",
"component-each": "^0.2.6",
"component-emitter": "github:component/emitter",
"component-url": "^0.2.1",
"core-js": "^3.6.5",
"crypto-js": "3.1.9-1",
"each": "^1.2.2",
"fs": "0.0.1-security",
Expand All @@ -61,6 +63,7 @@
"md5": "^2.2.1",
"obj-case": "^0.2.0",
"on-body": "0.0.1",
"regenerator-runtime": "^0.13.7",
"rudder-component-cookie": "0.0.1",
"semver": "^7.1.3",
"universal-analytics": "^0.4.20",
Expand Down
18 changes: 17 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,23 @@ export default {
builtins(),

babel({
presets: [["@babel/env"]],
exclude: ["node_modules/@babel/**", "node_modules/core-js/**"],
presets: [
[
"@babel/env",
{
corejs: 3,
useBuiltIns: "usage",
targets: {
edge: "17",
firefox: "60",
ie: "9",
chrome: "67",
safari: "11.1",
},
},
],
],
plugins: [
[
"@babel/plugin-proposal-class-properties",
Expand Down
8 changes: 4 additions & 4 deletions utils/logUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ const logger = {

info() {
if (LOG_LEVEL <= LOG_LEVEL_INFO) {
console.info(...arguments);
console.log(...arguments);
}
},

debug() {
if (LOG_LEVEL <= LOG_LEVEL_DEBUG) {
console.debug(...arguments);
console.log(...arguments);
}
},

warn() {
if (LOG_LEVEL <= LOG_LEVEL_WARN) {
console.warn(...arguments);
console.log(...arguments);
}
},

error() {
if (LOG_LEVEL <= LOG_LEVEL_ERROR) {
console.error(...arguments);
console.log(...arguments);
}
},
};
Expand Down

0 comments on commit c76c4f9

Please sign in to comment.