TypeScript add-on for electron-webpack that enables TypeScript compilation in Electron projects. Current version 4.0.1 requires TypeScript ^3.8.3 as a peer dependency. It integrates with electron-webpack's build pipeline, supporting features like JSX, Vue, and CSS Modules. This package is tied to the electron-webpack ecosystem, which has seen maintenance releases but no recent major updates. Compared to standalone Webpack TypeScript setups, it simplifies configuration by leveraging electron-webpack's convention-based approach.
npm install electron-webpack-tsVerified import paths — ran on the pinned version, not inferred.
Shows how to integrate electron-webpack-ts with electron-webpack in a configuration file and the required tsconfig.json setup.
Ensure tsconfig.json exists with appropriate compiler options.
Update your code to call the exported function instead of using it as a plugin directly.
Evaluate alternatives like electron-forge with Vite or esbuild.
Install compatible versions of vue and vue-class-component, and adjust tsconfig.json.
Consult the electron-webpack migration guide for breaking changes in its core API.
Add 'import React from 'react' in your JSX files or set 'jsx: 'react-jsx' in tsconfig.json.
Ensure electron-webpack-ts is added as a plugin in your electron-webpack.config.js.
Run 'npm install --save-dev electron-webpack-ts' and ensure it's in your package.json devDependencies.
Use: const { createConfig } = require('electron-webpack');