diff --git a/rsbuild/react-electron-template/builder/main/rsbuild.build.ts b/rsbuild/react-electron-template/builder/main/rsbuild.build.ts index 5d804eb4..d98e2bd8 100644 --- a/rsbuild/react-electron-template/builder/main/rsbuild.build.ts +++ b/rsbuild/react-electron-template/builder/main/rsbuild.build.ts @@ -1,29 +1,27 @@ -import {defineConfig} from '@rsbuild/core'; -import {releaseMainPath, rootPath, srcMainPath} from '../common/paths'; -import {join} from 'path'; +import { defineConfig } from '@rsbuild/core'; +import { releaseMainPath, rootPath, srcMainPath } from '../common/paths'; +import { join } from 'path'; import CommonConfig from '../common/rsbuild.common'; - const Config = defineConfig({ - tools: { - rspack: { - target: 'electron-main', - }, + tools: { + rspack: { + target: 'electron-main', }, - source: { - entry: { - index: join(srcMainPath, './index.ts'), - preload: join(srcMainPath, './preload.ts'), - }, + }, + source: { + entry: { + index: join(srcMainPath, './index.ts'), + preload: join(srcMainPath, './preload.ts'), }, - output: { - targets: ['node'], - distPath: { - root: join(releaseMainPath), - server: './', - }, - cleanDistPath: true, + }, + output: { + target: 'node', + distPath: { + root: join(releaseMainPath), }, + cleanDistPath: true, + }, }); module.exports = Object.assign(CommonConfig, Config);