@obuild/plugin-vue-sfc-transformer
v0.0.1
Published
Vue SFC transformer plugin for obuild
Downloads
5
Readme
📦 @obuild/plugin-vue-sfc-transformer 😯
Vue SFC transformer plugin for obuild.
This plugin uses vue-sfc-transformer package to transform Vue Single File Components (SFCs) into JavaScript files.
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(), // Optional: Use vue-tsc-dts to generate type declarations for Vue files
oxcTransform(), // Optional: Use oxc-transform to transform the TS(X) files to JS,
vueSFCTransformer({
// Configuration options
}),
],
},
],
});Options
The following interface describes the options you can pass to the plugin:
import type { Extensions } from "./config.ts";
export interface VueSFCPluginOptions {
/** File extensions that this plugin should process. */
extensions?: Extensions;
}License
💛 Released under the MIT license.
🤖 auto updated with automd
