Convert tracker build to TypeScript and add type checks
This commit is contained in:
1 parent
cb801230cc
commit
5911ddaa93
6 files changed
+347
-82
No files matched your search
@@ -1,14 +1,16 @@
|
||||
import 'dotenv/config';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
|
||||
export default {
|
||||
input: 'src/tracker/index.js',
|
||||
input: 'src/tracker/index.ts',
|
||||
output: {
|
||||
file: 'public/script.js',
|
||||
format: 'iife',
|
||||
},
|
||||
plugins: [
|
||||
typescript({ tsconfig: './tsconfig.tracker.json' }),
|
||||
replace({
|
||||
__COLLECT_API_HOST__: process.env.COLLECT_API_HOST || '',
|
||||
__COLLECT_API_ENDPOINT__: process.env.COLLECT_API_ENDPOINT || '/api/send',
|
||||
|
||||
Reference in new issue
Block a user