Skip to content

Commit

Permalink
Use abab for cross-platform atob/btoa, fix rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
LeartS committed May 26, 2019
1 parent c66c56f commit 74e012f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"abab": "^2.0.0",
"almond": "~0.3.0",
"es6-promise": "^4.1.0",
"eslint": "4.19.1",
Expand Down
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default [
commonjs(),
globals(),
babel({
exclude: ['node_modules/**'],
babelrc: false,
presets: [
['@babel/preset-env', {
targets: {
Expand All @@ -43,7 +43,7 @@ export default [
commonjs(),
globals(),
babel({
exclude: ['node_modules/**'],
babelrc: false,
presets: [
['@babel/preset-env', {
targets: {
Expand All @@ -58,15 +58,15 @@ export default [
// CommonJS (for Node) and ES module (for bundlers) build.
{
input: 'src/strophe.js',
external: ['window', 'md5'],
external: ['window', 'abab'],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
],
plugins: [
globals(),
babel({
exclude: ['node_modules/**'],
babelrc: false,
presets: [
['@babel/preset-env']
]
Expand Down
2 changes: 2 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
/*global define, document, sessionStorage, setTimeout, clearTimeout, ActiveXObject, DOMParser, btoa, atob, module */

import { atob, btoa } from 'abab'

import MD5 from './md5';
import SHA1 from './sha1';
import utils from './utils';
Expand Down

0 comments on commit 74e012f

Please sign in to comment.