@obuild/plugin-vue-tsc-dts
v0.0.2
Published
Vue declarations plugin for obuild
Readme
📦 @obuild/plugin-vue-tsc-dts 😯
TS declarations emit for obuild.
This plugin uses the vue-tsc CLI to generate declaration files (.d.mts and .d.ts) for your Vue components and your TypeScript code. It is designed to work seamlessly with the obuild build system, allowing you to easily generate type definitions for your projects.
Usage
Import the plugin in your build configuration and add it to the plugins array. You can also configure it with options.
import { defineBuildConfig } from "obuild/config";
import { tsgoDts } from "@obuild/plugin-tsgo-dts";
import { oxcTransform } from "@obuild/plugin-oxc-transform";
import { vueTscDts } from "@obuild/plugin-vue-tsc-dts";
import { vueSFCTransformer } from "@obuild/plugin-vue-sfc-transformer";
export default defineBuildConfig({
entries: [
{
type: "transform",
input: "./src/runtime/",
outDir: "./dist/runtime/",
plugins: [
tsgoDts(), // Optional tip: You can `tsgo-dts` to emit declarations for non-Vue files before `vue-tsc-dts`
vueTscDts({
// Configuration options
}),
oxcTransform(), // Optional: Use oxc-transform to transform the TS(X) files to JS,
vueSFCTransformer(), // Optional: Use vue-sfc-transformer to transform Vue SFCs
],
},
],
});Options
plugin-vue-tsc-dts uses the plugin-tsc-dts internally, you can use the same options as described in the plugin-tsc-dts documentation.
License
💛 Released under the MIT license.
