Skip to content

Imported constants produce undefined when inside template string in DEV mode #4340

Closed
@sheremet-va

Description

@sheremet-va

Version

3.2.2

Reproduction link

https://codesandbox.io/s/musing-lake-jx008?file=/src/App.vue

Steps to reproduce

Create test.ts file:

export const VARIABLE = '123';

Create Comp.vue file:

<script setup lang="ts">
import { VARIABLE } from './test'
</script>

<template>
    <div>{{ `${VARIABLE}123` }}</div>
</template>

What is expected?

123123 on screen

What is actually happening?

undefined123 on screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't workinghas workaroundA workaround has been found to avoid the problemscope: sfc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions