mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
* Update api-client package.json to use ES module format * Enhance api-client configuration by adding sideEffects flag and refactoring tsdown config for better output formats
32 lines
523 B
TypeScript
32 lines
523 B
TypeScript
import { defineConfig, type UserConfig } from "tsdown";
|
|
|
|
const sharedConfig: UserConfig = {
|
|
entry: ["./entry/index.ts"],
|
|
external: ["axios"],
|
|
noExternal: ["qs"],
|
|
outputOptions: {
|
|
globals: {
|
|
axios: "axios",
|
|
},
|
|
},
|
|
platform: "browser",
|
|
globalName: "HaloApiClient",
|
|
tsconfig: "./tsconfig.json",
|
|
exports: true,
|
|
dts: {
|
|
tsgo: true,
|
|
},
|
|
};
|
|
|
|
export default defineConfig([
|
|
{
|
|
...sharedConfig,
|
|
format: "esm",
|
|
},
|
|
{
|
|
...sharedConfig,
|
|
format: "iife",
|
|
minify: true,
|
|
},
|
|
]);
|