![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
electronite
Advanced tools
This is a drop-in replacement for electron that provides an enhanced font rendering system.
Electronite is a fork of electron that has been compiled with Graphite.
Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world.
npm i electronite
In your package.json
{
"scripts": {
"start": "electronite ."
}
}
In your javascript
const {...} = require("electronite");
It's important to note that when you use require("electron")
,
you aren't importing code from your dependencies but from the electron runtime.
So, even when you have only installed electronite you can still use require("electron")
.
However, since electron isn't installed you won't have the typings, so your IDE's auto-complete won't work.
Using require("electronite")
provides the proper typings so auto-complete will work.
It also makes more sense from a developer perspective.
However, in order for the application to work,
electronite automatically returns the real electron package when available from the runtime.
All of this is to say that electronite
must be installed as a dependency, not a dev-dependency.
The downside is that now there's potentially a large binary in your production code (depending on your build process).
If you are using webpack to build your application before compiling the electronite application,
this won't be a problem because webpack should automatically exclude the binary.
When a new version of this package is released, the corresponding version of electron.d.ts
needs to be copied from https://github.com/electron/electron/releases.
E.g. for version 6.0.7
of this package we downloaded electron.d.ts
from https://github.com/electron/electron/releases/tag/v6.0.7.
Then you must edit electron.d.ts
to declare the electronite
module.
// line 17536
declare module 'electronite' {
export = Electron.CrossProcessExports;
}
declare module 'electronite/main' {
export = Electron.Main
}
declare module 'electronite/common' {
export = Electron.Common
}
declare module 'electronite/renderer' {
export = Electron.Renderer
}
interface NodeRequireFunction {
(moduleName: 'electronite'): typeof Electron.CrossProcessExports;
(moduleName: 'electronite/main'): typeof Electron.Main;
(moduleName: 'electronite/common'): typeof Electron.Common;
(moduleName: 'electronite/renderer'): typeof Electron.Renderer;
}
interface NodeRequire {
(moduleName: 'electronite'): typeof Electron.CrossProcessExports;
(moduleName: 'electronite/main'): typeof Electron.Main;
(moduleName: 'electronite/common'): typeof Electron.Common;
(moduleName: 'electronite/renderer'): typeof Electron.Renderer;
}
Then you need to update the version of this package in package.json
to match the version of electronite that you are supporting.
It is important that the version matches exactly.
An easy way to make sure you are setting the correct version is to look inside electron.d.ts
and make sure the version indicated at the top of that file
is the same as the one in package.json
.
FAQs
Electron with graphite
We found that electronite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.