An open API service indexing awesome lists of open source software.

https://github.com/tofu-xx/sfc2esm

Code convertor from SFC to ESM | 由SFC到ESM的代码转换器
https://github.com/tofu-xx/sfc2esm

converter esm sfc vue vuejs

Last synced: 4 months ago
JSON representation

Code convertor from SFC to ESM | 由SFC到ESM的代码转换器

Awesome Lists containing this project

README

          


sfc2esm

![logo](./docs/sfc2esm.png)



English | 简体中文


About various Vue SFC source code conversion methods

## API

```ts
export interface Options {
id?: string
appName?: string
}
export declare function useXxx2x({ id, appName }?: Options): {
scr2app: (scriptSource: string, setup?: boolean) => string
tem2render: (templateSource: string) => string
sty2css: (styleSource: string, scoped?: boolean) => string
sfc2x: (sfcSource: string, mount?: string) => {
esm: string
app: string
render: string
css: string
}
}
```

## Who is using this?


setupin

[setupin](../../../setupin)



logo by:

vue-sfc2esm



dependencies:

@vue/compiler-sfc