Skip to content

Instantly share code, notes, and snippets.

View pfftdammitchris's full-sized avatar
💭
Dreaming

Christopher Tran pfftdammitchris

💭
Dreaming
View GitHub Profile
import type { Options } from 'tsup'
const config: Options = {
//
}
export default config
const config: Options = {
entry: ['src/index.ts'],
dts: true,
sourcemap: true,
format: ['iife', 'cjs', 'esm'],
}
export function sayHello() {
console.log('hello')
}
mkdir my-typescript-library
cd my-typescript-library
const config: Options = {
entry: ['src/index.ts'],
dts: true,
sourcemap: true,
}
const { sayHello } = require('./dist')
sayHello()
sayHello()
sayHello()
sayHello()
sayHello()
const config: Options = {
entry: ['src/index.ts'],
dts: true,
}