I’m using tsup to bundle a TypeScript package. But it’s adding a different hash to imports every time I bundle the lib. This isn’t good for version control, since every time I try to make a PR it’s saying I did 1000 changes!
Here’s an example:
dist/data/BankSlipConverter.d.ts
import { B as BankSlip } from '../../CheckoutOrderResult-926giQgX.js';
Same file but different build:
dist/data/BankSlipConverter.d.ts
import { B as BankSlip } from '../../CheckoutOrderResult-BsJ8VcUQ.js';
Here’s my tsup config file:
import type { Options } from 'tsup';
export const tsup: Options = {
splitting: true,
clean: true,
dts: true,
format: ['esm'],
minify: true,
bundle: false,
keepNames: true,
skipNodeModulesBundle: true,
entryPoints: ['src/index.ts'],
watch: false,
target: 'es2020',
outDir: 'dist',
sourcemap: false,
entry: ['src/**/*.ts'],
};