Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template src reference not supported #6

Closed
7 tasks done
StarHosea opened this issue Sep 26, 2021 · 1 comment
Closed
7 tasks done

template src reference not supported #6

StarHosea opened this issue Sep 26, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@StarHosea
Copy link

StarHosea commented Sep 26, 2021

Describe the bug

A.vue

<template src="./B.vue">
</template>
<script>
export default {
  
}
</script>

B.vue

<template>
   <div>This is real template </div>
</template>

When Vite build the A.vue in library mod , A Component's render compile result like this

function render(_ctx, _cache, $props, $setup, $data, $options) {
  return openBlock(), createElementBlock("template", null, _hoisted_2);
}

That will create a template tag in html. By the way, vue-cli service build works properly

Reproduction

the repo is
https://github.com/StarHosea/vite-template-build-issue.git

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 4.43 GB / 15.85 GB
  Binaries:
    Node: 12.18.4 - E:\DevEnv\nodejs\node.EXE
    Yarn: 1.17.3 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.6 - E:\DevEnv\nodejs\npm.CMD
  Browsers:
    Chrome: 93.0.4577.82
    Edge: Spartan (44.19041.1023.0), Chromium (94.0.992.31)
    Internet Explorer: 11.0.19041.1202

Used Package Manager

yarn

Logs

No response

Validations

@haoqunjiang haoqunjiang transferred this issue from vitejs/vite Dec 3, 2022
@sapphi-red
Copy link
Member

Closing as this isn't expected to work.
vuejs/core#6929

@sapphi-red sapphi-red added the wontfix This will not be worked on label Dec 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants