实际结果
报错[ERROR] No loader is configured for ".vue" files: src/App.vue
`
系统信息:
发行平台: app端,h5
操作系统: Android 9.0
HBuilderX版本: 3.7.11.20230427
uni-app版本: 3.0
设备信息: 华为p30
补充信息
因为编译报错是vue的loader解析问题,所以
临时解决方案,新建一个ts文件,内部exportcreateApp({}).use(xxxx),完全没有涉及vue文件,从而去使用其内部的一些js方法,但是会有一系列的警告。如下:
`Feature flags VUE_OPTIONS_API, VUE_PROD_DEVTOOLS are not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
问题描述 import {createApp} from '@/main.ts' app端会报错
[ERROR] No loader is configured for ".vue" files: src/App.vue
复现步骤
// #ifdef VUE3 Vue.config.globalProperties.$u = $u // #endif
app.config.globalProperties.$u
进行调用[或者可以直接贴源代码]
预期结果 导入createApp不会有对应的loader解析错误问题,或者提供其他方法来兼容vue3的此语法
实际结果 报错
[ERROR] No loader is configured for ".vue" files: src/App.vue
`系统信息:
补充信息 因为编译报错是vue的loader解析问题,所以 临时解决方案,新建一个ts文件,内部export
createApp({}).use(xxxx)
,完全没有涉及vue文件,从而去使用其内部的一些js方法,但是会有一系列的警告。如下: `Feature flags VUE_OPTIONS_API, VUE_PROD_DEVTOOLS are not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.