phoenix-ru / fervid

All-in-One Vue compiler written in Rust
https://phoenix-ru.github.io/fervid/
Apache License 2.0
371 stars 9 forks source link

Support SFC name inference #22

Closed phoenix-ru closed 5 months ago

phoenix-ru commented 7 months ago

name should be inferred based on file name. It may also be a good idea to use file paths as part of name (@/foo/bar.vue -> name: 'FooBar', but the spec has no such requirement.

Spec: https://github.com/vuejs/core/blob/272ab9fbdcb1af0535108b9f888e80d612f9171d/packages/compiler-sfc/__tests__/compileScript.spec.ts#L1252-L1306