
[英]React fetch not reaching warp (rust) server
我在从 React 访问 warp api 时遇到问题,即使我的 vite 代理设置如下: warp api 设置为允许任何来源: 如果我直接在浏览器中调用我的端点('http://localhost:3030/api/shop/available*),我会从我的 warp api 中得到所需的 ...
[英]React fetch not reaching warp (rust) server
我在从 React 访问 warp api 时遇到问题,即使我的 vite 代理设置如下: warp api 设置为允许任何来源: 如果我直接在浏览器中调用我的端点('http://localhost:3030/api/shop/available*),我会从我的 warp api 中得到所需的 ...
[英]Weekday boxes have little lines or spaces between them if you look carefully. These lines or gaps are present in chrome but not in firefox
我正在使用 vite react typescript。 我的应用组件 我的 DatePicker 组件 我的日历组件 最后是我的 css 文件 check this image包含工作日的框在 chrome中有奇怪的空间或黑白线,但在firefox中没有。 我尝试制作容器 flexbox,网格。 ...
[英]cypress-vite: heap out of memory
我最近将我的 CRA 项目转换为使用 Vite。 除了 Cypress e2e 测试外,一切正常。 我看到测试需要预处理,所以我添加了cypress-vite 。 现在每次我尝试运行测试时,都会收到以下错误: 这是我的cypress.config.ts : vite.config.ts : 编辑 ...
[英]How to get Vite.js to work in Wordpress/Wordplate
我有我目前正在使用的 Wordplate/Wordpress 网站。 Wordplate/Wordpress 自带 Vite。 现在我的问题是,我正试图让 Vite 在 Wordpress 中工作,就像 HMR 一样。 我真正想要的是,每次我更新我的index.scss时,网站都会得到这些更新。 ...
[英]How can I get Vite env variables?
我在我的项目中使用了 Quasar、Vue 3、Vite、Cypress。 我不知道如何获取.env变量(例如VITE_API_URL )并在cypress.env.json中设置。 在Vite之前我用过webpack,我知道怎么做。 我不想定义两次相同的变量,首先在.env中,然后在cypres ...
[英]How can I render html file inside my react component
我知道我们对这个问题有类似的疑问,但这里似乎没有任何作用。 我想渲染这个位于我的 React 项目根目录的页面。 appmixerStudio.html 这是我试图渲染它的地方: 在此之前,我将 html 转换为如下字符串: 当我右键单击页面时,标签似乎在那里 我正在使用 Vite 和 React ...
[英]Building React app for production throwing error in the react router dom v6.4 library
该应用程序是使用 Vite 构建的,它是一个基于 React ts 的应用程序。 该项目在开发模式下正常运行,但是当尝试使用npm run build用于生产的应用程序时,出现以下错误。 我真的不想将 react-router-dom 版本降级到 6.4 以下 有人可以在这里指导我吗? 无法解决错误 ...
[英]How can I expose my Vite project in WSL2?
我正在使用 --host 标签,该标签为我的电脑提供了 Ip 地址和暴露的端口 5173,但是当我尝试使用我的手机从 same.network 连接时,出现 CONNECTION_TIMED_OUT 错误。 ...
[英]Vite and VueJS3 and .mount('#app'); NOT WORKING
我一直在 inte.net 上阅读所有关于 Vite+VueJS3 在.mount("#app")点的问题的论坛和社区。 我正面临这个问题,不知道如何解决! 未捕获的 DOMException:字符串包含指向app.mount('#app'); Uncaught DOMException: Stri ...
[英]React-Router Browser Router alternate locations?
试图把我的头围在某事上。 使用react-router时,我们现在使用BrowserRouter来设置路由。 现在,在我的例子中,我使用 TypeScript 启动了一个 Vite 应用程序。其中有一个index.tsx文件和一个为所有内容提供服务的App.tsx文件。 最合乎逻辑的地方是让Bro ...
[英]Svelte replaces $lib by "rc" instead of "src" | Error: Not found: /rc/lib/Silika%20Demon%20Charadesign.png
我对 Svelte 有疑问。 我把我的图像放在 src/lib 文件夹中。 与标题相同,存在此错误。 这是我的代码: 组件/Arts.svelte Src 文件夹(如图)我的文件系统的图像路线/+page.svelte 我得到了这个错误:每次加载时,都会发生错误: 有没有办法来解决这个问题? 我 ...
[英]Lazy loading fontawesome icons in vue3 + vite not working in DEV
在我的 vue3+vite 项目中,我使用的是官方的 fontawesome vue3 package(参见 use with vue )。 为了启用 tree-shaking,您需要使用library.add预先静态加载必要的图标(或可能全部)。 参见例如以下App.vue<script s ...
[英]Why is the file `vite.svg` in the `dist` folder when building with Vite library mode?
我正在尝试使用 Vite 的库模式将 React 组件发布为 npm 模块。 但是,即使我的条目文件没有导入或使用图像vite.svg ,它也会被复制到 dist 文件夹中。 vite.config.js:export default defineConfig({ plugins: [rea ...
[英]Playwright & Vite - test block cannot find an element, although exists
我正在与带有vite前端应用程序的playwright一起运行一些 e2e 测试。 这是我的代码: 我运行这个脚本: playwright test -c./playwright.config.ts 当我运行测试时,output 是 但是,当我运行playwright test -c./playwr ...
[英]How do I use the .env files config from Webpack to Vite?
我最近开始将我的应用程序从 Create React App 迁移到 Vite,但我很难理解如何将 same.env 文件设置复制到 Vite。 在 CRA 中,我使用了 CRACO 和以下配置: 我有不同环境的 .env 文件:.env.local、.env.development、.env.s ...
[英]how to override the vuetify scss varibales in nuxt3 + vite
我想覆盖 vuetify scss varibale 以更改 v-text-field border-redius 检测到 'varibales.scss' 中所有定义的变量,但我想要 ovrride vuetify 变量。 ...
[英]Vite doesn't resolve extension for build
我打算按照本指南从 laravel-mix 迁移到 vite 当我运行npm run dev ( vite ) 时,一切都很好。 但是当我运行npm run build时,出现错误: 错误:无法加载 resources/js/hooks/useRoute(由 resources/js/app.tsx ...
[英]Why does SvelteKit require to include dependent scss files each time instead requiring them once, globally?
我正在尝试使用 SvelteKit 和 Bootstrap 构建一个项目。 在+layout.css文件中包含所有 Bootstrap 相关的 scss 文件后,我从我的custom.scss样式文件中收到一条错误消息: 这是我的+layout.svelte文件: 我已经设法确定我可以通过在我的c ...
[英]How to add Environment Variables in vite.config.js for a React Project
如何在 vite.config.js 文件中添加 Vite React 项目中的环境变量我想在.env文件中添加proxy_url,在部署的时候添加到环境中。 请看下面! StackOverflow 上的一些博客和答案,但它们为 Vue 解决了同样的问题。 这些在我的 Vite-React 项目中 ...
[英]How to execute react/vite/nodejs/express app simultaneously?
我是 React 和 JavaScript 的新手。我在将客户端和后端链接在一起时遇到了问题。 我尝试同时启动前端和后端,以便能够向后端发送请求并将数据提取到我的前端。 我遵循了本教程: https://levelup.gitconnected.com/how-to-simultaneously- ...