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

vite-ts cli项目 运行H5开发环境使用hybrid目录无法找到路径 #59

Open
z-sq opened this issue Aug 12, 2022 · 0 comments
Open

Comments

@z-sq
Copy link

z-sq commented Aug 12, 2022

目录结构

src
┣ hybrid
┃ ┗ html
┃   ┗ local.html
┣ pages
┃ ┣ index
┃ ┃ ┗ index.vue
┃ ┗ webview
┃   ┣ index.vue
┃   ┗ local.vue
┣ static
┃ ┗ logo.png
┣ App.vue
┣ env.d.ts
┣ main.ts
┣ manifest.json
┣ pages.json
┗ uni.scss

local.vue

<template>
  <view>
    <web-view src="/hybrid/html/local.html"></web-view>
  </view>
</template>

运行yarn dev:h5开发环境,访问/pages/webview/local控制台报错
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/hybrid/html/local.html

运行在app或者打包正式环境运行,一切可以正常显示

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant