File tree Expand file tree Collapse file tree 6 files changed +41
-6
lines changed Expand file tree Collapse file tree 6 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ $(OUT): node_modules $(SRC) package.json rollup.config.js rollup.min.js rollup.n
6868 @$(JSHINT ) --verbose $(SRC )
6969 @NODE_ENV=production $(ROLLUP ) --config rollup.config.js
7070 @NODE_ENV=production $(ROLLUP ) --config rollup.esm.js
71+ @NODE_ENV=production $(ROLLUP ) --config rollup.umd.js
7172 @NODE_ENV=production $(ROLLUP ) --config rollup.native.js
7273 @NODE_ENV=production $(ROLLUP ) --config rollup.nocompat.js
7374 @NODE_ENV=production $(ROLLUP ) --config rollup.min.js
Original file line number Diff line number Diff line change 11{
22 "name" : " amplitude-js" ,
33 "description" : " Javascript library for Amplitude Analytics" ,
4- "main" : " amplitude.js" ,
4+ "main" : " amplitude.umd. js" ,
55 "authors" : [
66 " Amplitude <support@amplitude.com>"
77 ],
Original file line number Diff line number Diff line change 11{
22 "name" : " amplitude-js" ,
33 "author" : " Amplitude <support@amplitude.com>" ,
4- "version" : " 5.11 .0" ,
4+ "version" : " 5.12 .0" ,
55 "license" : " MIT" ,
66 "description" : " Javascript library for Amplitude Analytics" ,
77 "keywords" : [
88 " analytics" ,
99 " amplitude"
1010 ],
1111 "repository" : " git://github.com/amplitude/amplitude-javascript.git" ,
12- "main" : " amplitude.js" ,
12+ "main" : " amplitude.umd. js" ,
1313 "react-native" : " amplitude.native.js" ,
1414 "dependencies" : {
1515 "@amplitude/ua-parser-js" : " 0.7.20" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default {
99 output : {
1010 name : 'amplitude' ,
1111 file : 'amplitude.js' ,
12- format : 'umd ' ,
12+ format : 'iife ' ,
1313 amd : {
1414 id : 'amplitude' ,
1515 }
Original file line number Diff line number Diff line change 1+ import resolve from 'rollup-plugin-node-resolve' ;
2+ import commonjs from 'rollup-plugin-commonjs' ;
3+ import replace from 'rollup-plugin-replace' ;
4+ import babel from 'rollup-plugin-babel' ;
5+ import json from 'rollup-plugin-json' ;
6+
7+ export default {
8+ input : 'src/index.js' ,
9+ output : {
10+ name : 'amplitude' ,
11+ file : 'amplitude.js' ,
12+ format : 'umd' ,
13+ amd : {
14+ id : 'amplitude' ,
15+ }
16+ } ,
17+ plugins : [
18+ json ( ) ,
19+ babel ( {
20+ exclude : 'node_modules/**' ,
21+ plugins : [ '@babel/plugin-proposal-object-rest-spread' ] ,
22+ } ) ,
23+ resolve ( {
24+ browser : true ,
25+ } ) ,
26+ replace ( {
27+ BUILD_COMPAT_SNIPPET : 'true' ,
28+ BUILD_COMPAT_LOCAL_STORAGE : 'true' ,
29+ BUILD_COMPAT_2_0 : 'true' ,
30+ BUILD_COMPAT_REACT_NATIVE : 'false' ,
31+ } ) ,
32+ commonjs ( ) ,
33+ ] ,
34+ } ;
Original file line number Diff line number Diff line change 22 var amplitude = window . amplitude || { '_q' :[ ] , '_iq' :{ } } ;
33 var as = document . createElement ( 'script' ) ;
44 as . type = 'text/javascript' ;
5- as . integrity = 'sha384-XjqOOyFvYU+vG4+WrAuiEGo7iwlPziIAukUSiFSme/Jj5Rdk1G9Fu5iMmjxg4XRk ' ;
5+ as . integrity = 'sha384-AGAP8hLFGmWct8CISyv9W0dsAYlj/1X7y99zLRAMPI8HANfyBrMgg8CMmBs+jPsZ ' ;
66 as . crossOrigin = 'anonymous' ;
77 as . async = true ;
8- as . src = 'https://cdn.amplitude.com/libs/amplitude-5.11 .0-min.gz.js' ;
8+ as . src = 'https://cdn.amplitude.com/libs/amplitude-5.12 .0-min.gz.js' ;
99 as . onload = function ( ) { if ( ! window . amplitude . runQueuedFunctions ) { console . log ( '[Amplitude] Error: could not load SDK' ) ; } } ;
1010 var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
1111 s . parentNode . insertBefore ( as , s ) ;
You can’t perform that action at this time.
0 commit comments