Coder Social home page Coder Social logo

harhao / electron-vite-react-starter Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 171 KB

Starter using Vite2 + React17 + Typescript4 + Electron12 .

Shell 0.58% JavaScript 11.35% TypeScript 77.61% SCSS 6.87% HTML 3.59%
electron react starter-template vite

electron-vite-react-starter's Introduction

𝐇𝐞𝐥𝐥𝐨 𝐭𝐡𝐞𝐫𝐞, 𝐟𝐞𝐥𝐥𝐨𝐰 <𝚌𝚘𝚍𝚎𝚛𝚜/>!

electron-vite-react-starter's People

Contributors

harhao avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zspishere

electron-vite-react-starter's Issues

增加react-activation之后,开发时功能正常,运行build之后可执行文件时报错

Hi,我在此项目基础上,增加了一个package:react-activation,类似Vue的<KeepAlive />,实现组件状态的自动保存。

错误描述

开发过程中,功能正常。Build之后,执行unpack目录的electron-vite-react-starter.exe,功能无法运行,报两个同样的错误

vendor.83d6ef6d.js:4784 Error: Minified React error #130;
visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

错误重现步骤

  • yarn add react-activation
  • yarn dev -- 功能正常
  • yarn build
  • 运行electron-vite-react-starter\release\0.0.1\win-unpacked\electron-vite-react-starter.exe,发现上述两个报错

复现错误的MR

zspishere@55351ec

复现错误的Repo

https://github.com/zspishere/electron-vite-react-starter

补充

通过create-react-app创建react17的项目,增加react-activation,以及相应的代码src/renderer/Test.jsx

  • 开发过程,功能正常
  • build之后,通过浏览器直接访问http://localhost:5000/功能也正常

麻烦有时间帮忙确认是vite2的问题,还是react-activation的问题。

build之后,运行失败

Hi,您的这个项目很赞!
我在build过程中,遇到一个问题,麻烦帮忙确认是我操作的问题,还是代码存在bug。

错误描述

yarn build之后,采用以下两种方式运行,均显示白框Developer Tools报错如下

白框

Developer Tools报错

错误复现

  • 直接运行unpacked软件:electron-vite-react-starter\release\0.0.1\win-unpacked\electron-vite-react-starter.exe
  • 本地安装之后,再运行安装之后的软件。安装程序:electron-vite-react-starter\release\0.0.1\electron-vite-react-starter_0.0.1.exe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.