You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have ejected a Create React App (CRA) and am configuring it with a custom Webpack setup. I am separating the login, registration, and main pages into different entry points to support multiple pages for server-side rendering (SSR). However, I'm encountering an error when generating the build.
@alexander-akait I verified regular expression related changes, it's working in development mode, only production build is failing, bdw I Can't provide you the same repo as it's private but here is the fresh version of CRA webpack config.
Current behaviour 💣
I have ejected a Create React App (CRA) and am configuring it with a custom Webpack setup. I am separating the login, registration, and main pages into different entry points to support multiple pages for server-side rendering (SSR). However, I'm encountering an error when generating the build.
Uncaught SyntaxError: Unexpected token '<' (at login.c5941da3.js:1:1)
Expected behaviour ☀️
Want to fix this issue and login, join should work separately, other routes points to main.html.
Configuration 👾
webpack.config.js
webpackDevServer.config.js
Added below config in this file.
historyApiFallback: { index: '/index.html', rewrites: [ { from: /^\/$/, to: '/index.html' }, { from: /^\/join/, to: '/join.html' }, { from: /^\/login/, to: '/login.html' }, ], },
Environment 🖥
OS: Mac
Node.js v20.16.0
"webpack": "@5.64.4",
"html-webpack-plugin": "@^5.5.0",
"react": "^18.3.1",
"typescript": "^4.9.5",
The text was updated successfully, but these errors were encountered: