forked from opentiny/tiny-vue
30 lines
524 B
TypeScript
30 lines
524 B
TypeScript
import { defineConfig, type Options } from 'tsup'
|
|
|
|
const shared: Options = {
|
|
entry: ['src/**/*.ts'],
|
|
splitting: false,
|
|
bundle: false,
|
|
// sourcemap: true,
|
|
clean: true,
|
|
target: 'node14',
|
|
platform: 'node',
|
|
dts: false,
|
|
publicDir: true
|
|
}
|
|
|
|
export default defineConfig([
|
|
{
|
|
format: ['esm'],
|
|
outDir: 'dist/esm',
|
|
outExtension: () => ({ js: '.js', }),
|
|
...shared,
|
|
},
|
|
{
|
|
format: ['cjs'],
|
|
outDir: 'dist/cjs',
|
|
shims: true,
|
|
outExtension: () => ({ js: '.js', }),
|
|
...shared,
|
|
},
|
|
])
|