You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<scriptlang="ts">import { ref } from"vue";import { defineComponent } from"@nuxtjs/composition-api";exportdefaultdefineComponent({ setup() {const a =ref();asyncfunction b() {returnawaitPromise.resolve(); }return { a, b }; },});</script>
Generated source (chrome devtool sourcemap)
import{ref}from"vue";import{defineComponent}from"@nuxtjs/composition-api";exportdefaultdefineComponent({setup(){consta=ref();asyncfunctionb(){returnawaitPromise.resolve();}return{ a, b };},});
2. using Auto import
Original source
<scriptlang="ts">// import { ref } from "vue";// import { defineComponent } from "@nuxtjs/composition-api";exportdefaultdefineComponent({ setup() {const a =ref();asyncfunction b() {returnawaitPromise.resolve(); }return { a, b }; },});</script>
Generated source (chrome devtool sourcemap)
import_asyncToGeneratorfrom"@babel/runtime/helpers/esm/asyncToGenerator";import"regenerator-runtime/runtime.js";import"core-js/modules/es.object.to-string.js";// import { ref } from 'vue';// import { defineComponent } from '@nuxtjs/composition-api';exportdefaultdefineComponent({setup: functionsetup(){vara=ref();functionb(){return_b.apply(this,arguments);}function_b(){_b=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function_callee(){returnregeneratorRuntime.wrap(function_callee$(_context){while(1)switch(_context.prev=_context.next){case0:
_context.next=2;returnPromise.resolve();case2:
return_context.abrupt("return",_context.sent);case3:
case"end":
return_context.stop();}},_callee);}));return_b.apply(this,arguments);}return{a: a,b: b};}});
The text was updated successfully, but these errors were encountered:
serialine
changed the title
When use auto imported apis, the source will be babel transpiled
When use auto imported apis, the sourcemap will be babel transpiled
Jan 4, 2024
Describe the bug
1. using Manual import
Original source
Generated source (chrome devtool sourcemap)
2. using Auto import
Original source
Generated source (chrome devtool sourcemap)
Reproduction
https://github.com/serialine/nuxt-ts-autoimport-transpiled
Question
Is there a way to avoid this?
Reproduction
https://github.com/serialine/nuxt-ts-autoimport-transpiled
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: