From 1dd401cdc3c34695d2b224ffc2bab8d563da7ce0 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Wed, 16 Oct 2024 23:48:09 -0700 Subject: [PATCH] fix(react): update rspack to include styles in the main bundle (#28478) ## Current Behavior Currently, styles are not included in the main bundle by default. ## Expected Behavior Similar to webpack, styles should be included by default. ## Related Issue(s) Fixes #28465 --- .../application/files/base-rspack/src/main.tsx__tmpl__ | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ b/packages/react/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ index d5a60a7b0dd14..b9c4df4721ab4 100644 --- a/packages/react/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ +++ b/packages/react/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ @@ -3,6 +3,7 @@ import * as ReactDOM from 'react-dom/client'; <% if (routing) { %>import { BrowserRouter } from 'react-router-dom';<% } %> import App from './app/<%= fileName %>'; +import './styles.<%= style %>' const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement); root.render(