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的代码转换器
- Host: GitHub
- URL: https://github.com/tofu-xx/sfc2esm
- Owner: Tofu-Xx
- License: mit
- Created: 2024-11-15T15:06:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T16:07:13.000Z (over 1 year ago)
- Last Synced: 2025-04-12T22:52:46.679Z (about 1 year ago)
- Topics: converter, esm, sfc, vue, vuejs
- Language: TypeScript
- Homepage:
- Size: 361 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sfc2esm

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)
logo by:
vue-sfc2esm
dependencies:
@vue/compiler-sfc