Comments (5)
If the electron-vite
tool begins throwing Cannot write './src/preload/index.d.ts' because it would overwrite input file.
, then the solution is to add "noEmit": true
to compilerOptions
in tsconfig.node.json
and tsconfig.web.json
. This answer was found here: vitejs/vite#13747 (comment)
from synectic.
electron-vite
includes pre-populated config files for Electron Builder, which should be removed and migrated into config files for conveyor
as part of #1277.
from synectic.
There are two slightly different Electron-Vite sites:
from synectic.
An interesting anecdote from the migration is that as of 1e6bbb5, we are seeing the following error message:
The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed. ts(7056)
Related to reduxjs/redux-toolkit#3591 and Typescript: "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.", this error occurs when calling createAsyncThunk.withTypes<>()
. But it only occurs when "declaration": true
is set in the tsconfig.json
files.
The electron-vite
project provides templates that include the the following compilerOptions
:
Lines 13 to 22 in 1e6bbb5
It is not immediately obvious how this relates to "declaration": true
, until looking at the TypeScript tsconfig#composite documentation:
The
composite
option enforces certain constraints which make it possible for build tools (including TypeScript itself, under --build mode) to quickly determine if a project has been built yet.When this setting is on:
The
rootDir
setting, if not explicitly set, defaults to the directory containing thetsconfig.json
file.All implementation files must be matched by an
include
pattern or listed in thefiles
array. If this constraint is violated,tsc
will inform you which files weren’t specified.
declaration
defaults totrue
This last point is the cause of those "...inferred type of this node exceeds the maximum length the compiler will serialize..." errors, since "composite": true
requires "declaration": true
. We can fix this issue by removing the following line, in which case "declaration": false
is the default:
Line 14 in 1e6bbb5
from synectic.
Since sindresorhus/find-up is pure ESM only (as of v6.0.0), and ESM support in Electron is not going to be released until Electron 28, we must externalize this dependency in order to prevent it being bundled into a CJS module chunk in Vite. The solution for doing so was found alex8088/electron-vite#35:
synectic/electron.vite.config.ts
Lines 12 to 24 in aef4223
from synectic.
Related Issues (20)
- `ENOENT: no such file or directory, getRoot` error thrown when branch is "prunable"
- Undo/Redo actions in Synectic editors using `redux-undo`
- `Manifest version 2 is deprecated, and support will be removed in 2023`
- Cache subscriptions drop multiple reserves on `metafiles/switchBranch` action
- Use `createAsyncThunk.withTypes<>()` from RTK 1.9 for pre-typed `createAsyncThunk`
- `FSCache` event handler uses stale `reserved` state when updating cache after edit/save
- Multithreading Redux Actions HOT 3
- Deprecate and replace `uuid` library with built-in JavaScript `Crypto` library
- Improve return type of `utils.removeUndefinedProperties` to exclude `never` properties HOT 4
- Upgrade to React 18 HOT 1
- Upgrade to Yarn 4 HOT 1
- Installation via `deb` package fails on Ubuntu Linux HOT 2
- `+[CATransaction synchronize] called within transaction` on MacOS HOT 1
- Checkout or switch to remote-only branch results in `fatal: ambiguous argument '<branch>': unknown revision or path not in the working tree.` HOT 1
- `fatal: detected dubious ownership in repository` on Windows HOT 2
- `fatal: cannot lock ref 'refs/heads/extra'` on Windows HOT 1
- Switch `electron-forge` for `conveyor` packaging tool HOT 5
- Option to delete files
- Visual overlapping (`z-index`) when cards expanded into fullscreen mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synectic.