Skip to content

Commit

Permalink
Support for older browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Sierociński committed Oct 26, 2020
1 parent befc8a4 commit 8115b41
Show file tree
Hide file tree
Showing 9 changed files with 1,476 additions and 153 deletions.
4 changes: 2 additions & 2 deletions dist/smartbear-browser-info.embed.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.embed.min.js.map

Large diffs are not rendered by default.

1,411 changes: 1,347 additions & 64 deletions dist/smartbear-browser-info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/smartbear-browser-info.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/smartbear-browser-info.min.js.map

Large diffs are not rendered by default.

169 changes: 102 additions & 67 deletions package-lock.json

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

17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smartbear/browser-info",
"version": "1.2.0",
"version": "1.2.1",
"description": "Tiny developer-friendly JS library that provides information about host browser",
"main": "dist/smartbear-browser-info.min.js",
"scripts": {
Expand Down Expand Up @@ -33,18 +33,13 @@
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"corejs": "^1.0.0",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"core-js": "^3.6.5",
"eslint": "^7.8.1",
"rollup": "^2.26.11",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2"
},
"browserslist": [
"> 4%",
"Firefox ESR",
"not dead"
]
}
}
18 changes: 14 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

import babel from 'rollup-plugin-babel';
import cjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser';
import del from 'rollup-plugin-delete';

Expand Down Expand Up @@ -37,12 +39,14 @@ function getBabelPlugin() {
[
'@babel/env',
{
useBuiltIns: 'entry',
corejs: '3.6',
targets: '> 2%, Firefox ESR, ie 11, safari 10, ios_saf 10',
useBuiltIns: 'usage',
corejs: 3,
modules: false
}
]
]
],
babelHelpers: 'bundled'
});
}

Expand Down Expand Up @@ -71,6 +75,8 @@ export default [
targets: 'dist/*',
runOnce: true
}),
cjs(),
resolve(),
getBabelPlugin()
],
external
Expand All @@ -81,6 +87,8 @@ export default [
input,
output: getOutput(true),
plugins: [
cjs(),
resolve(),
getBabelPlugin(),
terser({
output: {
Expand All @@ -102,6 +110,8 @@ export default [
input: 'src/embed.js',
output: getOutput(true, '.embed'),
plugins: [
cjs(),
resolve(),
getBabelPlugin(),
getTerserPlugin()
],
Expand Down

0 comments on commit 8115b41

Please sign in to comment.