Skip to content

Commit d141a1e

Browse files
committed
Use abab for cross-platform atob/btoa, fix rollup config
1 parent c66c56f commit d141a1e

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
"sinon-qunit": "~2.0.0",
7474
"yarpm": "^0.2.1"
7575
},
76-
"dependencies": {},
76+
"dependencies": {
77+
"abab": "^2.0.0"
78+
},
7779
"optionalDependencies": {
7880
"ws": "^7.0.0",
7981
"xmldom": "^0.1.27"

rollup.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default [
1919
commonjs(),
2020
globals(),
2121
babel({
22-
exclude: ['node_modules/**'],
22+
babelrc: false,
2323
presets: [
2424
['@babel/preset-env', {
2525
targets: {
@@ -43,7 +43,7 @@ export default [
4343
commonjs(),
4444
globals(),
4545
babel({
46-
exclude: ['node_modules/**'],
46+
babelrc: false,
4747
presets: [
4848
['@babel/preset-env', {
4949
targets: {
@@ -58,15 +58,15 @@ export default [
5858
// CommonJS (for Node) and ES module (for bundlers) build.
5959
{
6060
input: 'src/strophe.js',
61-
external: ['window', 'md5'],
61+
external: ['window', 'abab'],
6262
output: [
6363
{ file: pkg.main, format: 'cjs' },
6464
{ file: pkg.module, format: 'es' }
6565
],
6666
plugins: [
6767
globals(),
6868
babel({
69-
exclude: ['node_modules/**'],
69+
babelrc: false,
7070
presets: [
7171
['@babel/preset-env']
7272
]

src/core.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
/*global define, document, sessionStorage, setTimeout, clearTimeout, ActiveXObject, DOMParser, btoa, atob, module */
88

9+
import { atob, btoa } from 'abab'
10+
911
import MD5 from './md5';
1012
import SHA1 from './sha1';
1113
import utils from './utils';

0 commit comments

Comments
 (0)