From 032112c633b229075aed845aa17c374ff1646a0e Mon Sep 17 00:00:00 2001 From: JW Date: Thu, 21 Mar 2024 17:32:11 +0800 Subject: [PATCH] chore: revert template code --- packages/create-rspack/template-react-ts/rspack.config.js | 2 -- packages/create-rspack/template-react-ts/src/App.tsx | 2 -- .../template-react-ts/src/components/button.client.tsx | 5 ----- .../template-react-ts/src/components/button.server.tsx | 5 ----- packages/rspack/src/builtin-plugin/index.ts | 6 +++--- 5 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 packages/create-rspack/template-react-ts/src/components/button.client.tsx delete mode 100644 packages/create-rspack/template-react-ts/src/components/button.server.tsx diff --git a/packages/create-rspack/template-react-ts/rspack.config.js b/packages/create-rspack/template-react-ts/rspack.config.js index 18f70679516f..3727d1b42e50 100644 --- a/packages/create-rspack/template-react-ts/rspack.config.js +++ b/packages/create-rspack/template-react-ts/rspack.config.js @@ -72,8 +72,6 @@ module.exports = { } }, plugins: [ - new rspack.RSCClientEntryPlugin(), - new rspack.RSCClientReferenceManifestRspackPlugin(), new rspack.DefinePlugin({ "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV) }), diff --git a/packages/create-rspack/template-react-ts/src/App.tsx b/packages/create-rspack/template-react-ts/src/App.tsx index 35b7ebdb7e02..f6390bb2bb37 100644 --- a/packages/create-rspack/template-react-ts/src/App.tsx +++ b/packages/create-rspack/template-react-ts/src/App.tsx @@ -1,6 +1,5 @@ import { useState } from "react"; import reactLogo from "./assets/react.svg"; -import { ServerButton } from './components/button.server' import "./App.css"; function App() { @@ -8,7 +7,6 @@ function App() { return (
-
React logo diff --git a/packages/create-rspack/template-react-ts/src/components/button.client.tsx b/packages/create-rspack/template-react-ts/src/components/button.client.tsx deleted file mode 100644 index 5d7637b5cd7b..000000000000 --- a/packages/create-rspack/template-react-ts/src/components/button.client.tsx +++ /dev/null @@ -1,5 +0,0 @@ -'use client' - -export const Button = () => { - return (<>button) -} \ No newline at end of file diff --git a/packages/create-rspack/template-react-ts/src/components/button.server.tsx b/packages/create-rspack/template-react-ts/src/components/button.server.tsx deleted file mode 100644 index 0006f756df3f..000000000000 --- a/packages/create-rspack/template-react-ts/src/components/button.server.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { Button } from './button.client' - -export const ServerButton = () => { - return