![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@brillout/vite-plugin-server-entry
Advanced tools
- [What is this?](#what-is-this) - [Manual import](#manual-import) - [How it works](#how-it-works)
@brillout/vite-plugin-server-entry
does two things:
dist/server/entry.js
.Vike and Telefunc automatically use and configure this plugin on your behalf: there is nothing for you to do and you can usually ignore this plugin.
Normally, the dist/server/entry.js
file is automatically imported.
But this automatic importing doesn't work with Yarn PnP and certain Docker configurations, and you'll keep getting the following error:
[@brillout/vite-plugin-server-entry][Wrong Usage] The server production entry is missing
or wasn't imported. (Re-)build your app and try again. If you still get this error,
then you need to manually import the server production entry.
The workaround is to manually import dist/server/entry.js
in your server code.
// server.js
// Add this import at the begining of your server code
import './path/to/dist/server/entry.js'
// Your server code (Express.js, Hono, Vercel Serverless/Edge Function, Cloudflare Worker, ...)
// ...
Make sure to import dist/server/entry.js
only in production, see Conditional manual import.
[!NOTE] The file extension may be different than
.js
(e.g.dist/server/entry.mjs
), and the build directory location is determined byvite.config.js
>build.outDir
which may be different thandist/
(e.g.build/server/entry.js
). Adjust your import accordingly:
- import './path/to/dist/server/entry.js + import './path/to/build/server/entry.mjs
[!NOTE] If you aren't using Yarn PnP nor Docker and you keep getting this error, then it's most likely a bug and please file a bug report.
[!NOTE] Technically, the automatic importing doesn't work when your
node_modules/
directory is immutable or if you remove/resetnode_modules/
after you build your app for production. If you want to know more, see How it works.
[!NOTE] You usually don't need to read this. If you have a problem, reading the section Manual import is usually enough.
@brillout/vite-plugin-server-entry
does two things:
dist/server/entry.js
.node_modules/@brillout/vite-plugin-server-entry/dist/importServerEntry/autoImporter.js
.The server production entry, which is located at dist/server/entry.js
, enables tools such as Vike and Telefunc to consolidate their production entry into a single file. It loads the user files built for production which are located at dist/**
(e.g. the built .telefunc.js
user files for Telefunc, and the built +Page.js
user files for Vike).
The auto importer file, which is located at node_modules/@brillout/vite-plugin-server-entry/dist/importServerEntry/autoImporter.js
, automatically imports dist/server/entry.js
on your behalf, so that you don't have to manually import dist/server/entry.js
yourself as shown in the following. That's the only purpose of the auto importer.
// server/index.js (*your* server entry)
// Without the auto importer, you would have to manually import dist/server/entry.js
// yourself, for example like this:
if (process.env.NODE_ENV === 'production') {
await import('../dist/server/entry.js')
}
See How the auto importer works for more information.
FAQs
- [What is this?](#what-is-this) - [Manual import](#manual-import) - [How it works](#how-it-works)
The npm package @brillout/vite-plugin-server-entry receives a total of 28,130 weekly downloads. As such, @brillout/vite-plugin-server-entry popularity was classified as popular.
We found that @brillout/vite-plugin-server-entry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.