22 lines
467 B
TypeScript
22 lines
467 B
TypeScript
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,
|
|
outDir: resolve(__dirname, '../dist/src/server/public'),
|
|
},
|
|
})
|
|
.then((res) => {
|
|
console.log('Build Tracker Completed');
|
|
});
|