-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an iife bundle for the snippet (#248)
- Loading branch information
Krishna Rajendran
authored
Apr 13, 2020
1 parent
f2025ee
commit 34d978f
Showing
6 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "amplitude-js", | ||
"description": "Javascript library for Amplitude Analytics", | ||
"main": "amplitude.js", | ||
"main": "amplitude.umd.js", | ||
"authors": [ | ||
"Amplitude <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"name": "amplitude-js", | ||
"author": "Amplitude <[email protected]>", | ||
"version": "5.11.0", | ||
"version": "5.12.0", | ||
"license": "MIT", | ||
"description": "Javascript library for Amplitude Analytics", | ||
"keywords": [ | ||
"analytics", | ||
"amplitude" | ||
], | ||
"repository": "git://github.com/amplitude/amplitude-javascript.git", | ||
"main": "amplitude.js", | ||
"main": "amplitude.umd.js", | ||
"react-native": "amplitude.native.js", | ||
"dependencies": { | ||
"@amplitude/ua-parser-js": "0.7.20", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import replace from 'rollup-plugin-replace'; | ||
import babel from 'rollup-plugin-babel'; | ||
import json from 'rollup-plugin-json'; | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: { | ||
name: 'amplitude', | ||
file: 'amplitude.js', | ||
format: 'umd', | ||
amd: { | ||
id: 'amplitude', | ||
} | ||
}, | ||
plugins: [ | ||
json(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
plugins: ['@babel/plugin-proposal-object-rest-spread'], | ||
}), | ||
resolve({ | ||
browser: true, | ||
}), | ||
replace({ | ||
BUILD_COMPAT_SNIPPET: 'true', | ||
BUILD_COMPAT_LOCAL_STORAGE: 'true', | ||
BUILD_COMPAT_2_0: 'true', | ||
BUILD_COMPAT_REACT_NATIVE: 'false', | ||
}), | ||
commonjs(), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters