Open
Description
Repro: https://github.com/sp00x/vue-typescript-name-bug
2 components, Foo (ts) and Bar (js) registered as global components in main.ts using
import Foo from '@/components/Foo.vue';
import Bar from '@/components/Bar.vue';
Vue.component(Foo.name, Foo) // typescript
Vue.component(Bar.name, Bar) // javascript
With yarn serve
it logs in the console:
in App.vue:
Foo.name = Foo
Bar.name = Bar
in main.ts
Foo.name = Foo
Bar.name = Bar
and renders
Foo:
foo
- Bar:
bar
With yarn build
output it logs in the console:
in App.vue:
Foo.name = t
Bar.name = Bar
in main.ts
Foo.name = t
Bar.name = Bar
renders:
Foo: - Bar:
bar
Foo
is a typescript SFC, where as Bar
is a regular javascript SFC with export default { name: 'Bar' }
Seems like the typescript value is being obfuscated or uglified somehow?