Skip to content

"name" in @Component options is obfuscated (?) in build version #407

Open
@sp00x

Description

@sp00x

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions