chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
format: ["cjs", "esm"],
|
||||
dts: true,
|
||||
splitting: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
treeshake: true,
|
||||
bundle: true,
|
||||
minify: false,
|
||||
noExternal: [
|
||||
// Always bundle internal packages
|
||||
/^@internal/,
|
||||
// Always bundle ESM-only packages
|
||||
"nanoid",
|
||||
"p-limit",
|
||||
],
|
||||
banner: ({ format }) => {
|
||||
if (format !== "esm") return;
|
||||
|
||||
return {
|
||||
js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url || process.cwd() + '/index.js');`,
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user