1
0
mirror of https://github.com/robonen/tools.git synced 2026-03-20 02:44:45 +00:00
Files
tools/vue/primitives/tsdown.config.ts

27 lines
673 B
TypeScript

import { defineConfig } from 'tsdown';
import { sharedConfig } from '@robonen/tsdown';
import Vue from 'unplugin-vue/rolldown';
export default defineConfig({
...sharedConfig,
entry: ['src/index.ts'],
plugins: [Vue({ isProduction: true })],
dts: { vue: true },
deps: {
neverBundle: ['vue'],
alwaysBundle: [/^@robonen\//, '@vue/shared'],
},
inputOptions: {
resolve: {
alias: {
// We need to alias @vue/shared to its ESM build to avoid issues
// with tree-shaking and module resolution in Rolldown
'@vue/shared': '@vue/shared/dist/shared.esm-bundler.js',
},
},
},
define: {
__DEV__: 'false',
},
});