Skip to content

Commit 4a7409a

Browse files
committed
Commut rollup.native.js and add built files to .gitignore
1 parent 1e0a417 commit 4a7409a

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ amplitude.min.js
1212
amplitude.nocompat.js
1313
amplitude.nocompat.min.js
1414
amplitude-snippet.min.js
15+
amplitude.native.js
16+
.watchmanconfig

rollup.native.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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.native.js',
12+
format: 'umd',
13+
},
14+
plugins: [
15+
json(),
16+
babel({
17+
exclude: 'node_modules/**',
18+
plugins: ['@babel/plugin-proposal-object-rest-spread'],
19+
}),
20+
resolve({
21+
browser: true,
22+
}),
23+
replace({
24+
BUILD_COMPAT_SNIPPET: 'false',
25+
BUILD_COMPAT_2_0: 'true',
26+
BUILD_COMPAT_LOCAL_STORAGE: 'true',
27+
BUILD_COMPAT_REACT_NATIVE: 'true',
28+
}),
29+
commonjs(),
30+
],
31+
};

0 commit comments

Comments
 (0)