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

The annotated code is also parsed. export default #2277

Closed
buledong opened this issue Feb 26, 2021 · 0 comments
Closed

The annotated code is also parsed. export default #2277

buledong opened this issue Feb 26, 2021 · 0 comments

Comments

@buledong
Copy link

buledong commented Feb 26, 2021

Describe the bug

The annotated code is also parsed, export default

Reproduction

Basic repo
https://github.com/buledong/repro-vite-duplicate-export-default

<script>
export default {
};
// export default class MasterLevel extends Vue {
// };
</script>

System Info

  • vite version: 2.0.1 & 2.0.3
  • Operating System: win & mac
  • Node version: 12.16.1
  • Package manager (npm/yarn/pnpm) and version: 6.14.10 & 7

Logs (Optional if provided reproduction)

import { createHotContext as __vite__createHotContext } from "/@vite/client";import.meta.hot = __vite__createHotContext("/src/App.vue");
//  here 
export default {
};

// class MasterLevel extends Vue {
// };

const _sfc_main = MasterLevel
import { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "/node_modules/.vite/vue.js?v=33206dcc"

const _hoisted_1 = {
  alt: "Vue logo",
  src: "/src/assets/logo.png"
}

function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock(), _createBlock("img", _hoisted_1))
}

import "/src/App.vue?vue&type=style&index=0&lang.css"

_sfc_main.render = _sfc_render
_sfc_main.__file = "C:/Users/zhaolian/Downloads/repro-vite-duplicate-export-default-master/repro-vite-duplicate-export-default-master/src/App.vue"
// and here
export default _sfc_main
_sfc_main.__hmrId = "7ba5bd90"
typeof __VUE_HMR_RUNTIME__ !== 'undefined' && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)
import.meta.hot.accept(({ default: updated, _rerender_only }) => {
  if (_rerender_only) {
    __VUE_HMR_RUNTIME__.rerender(updated.__hmrId, updated.render)
  } else {
    __VUE_HMR_RUNTIME__.reload(updated.__hmrId, updated)
  }
})
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants