From cb2511a8ac367e99e0f92938be3808c240aa995d Mon Sep 17 00:00:00 2001 From: moki <2893096286@qq.com> Date: Wed, 11 Sep 2024 11:57:50 +0800 Subject: [PATCH] fix: break api --- .../builder/main/rsbuild.build.ts | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) 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);