-
-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Labels
wontfixThis will not be worked onThis will not be worked on
Description
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.1202Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on