2023-09-02 19:49:44 +00:00
|
|
|
import { resolve } from 'path';
|
|
|
|
import vite from 'vite';
|
|
|
|
|
|
|
|
console.log('Start Build Tracker');
|
|
|
|
|
|
|
|
vite
|
|
|
|
.build({
|
|
|
|
build: {
|
|
|
|
lib: {
|
|
|
|
entry: resolve(__dirname, '../src/tracker/index.js'),
|
|
|
|
name: 'tianji',
|
|
|
|
fileName: () => 'tracker.js',
|
|
|
|
formats: ['iife'],
|
|
|
|
},
|
|
|
|
emptyOutDir: false,
|
2023-09-03 11:28:53 +00:00
|
|
|
outDir: resolve(__dirname, '../public'),
|
2023-09-02 19:49:44 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
.then((res) => {
|
|
|
|
console.log('Build Tracker Completed');
|
|
|
|
});
|