fix: drop react-swc plugin for esbuild JSX and add vite-bundle routes
Use esbuild's built-in JSX transform instead of @vitejs/plugin-react-swc to fix the React Fast Refresh preamble error caused by eager glob imports. Add missing pentatrion_vite routes to fix web debug toolbar 500 errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1459,6 +1459,34 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* controllers_path?: scalar|null|Param, // The path to the directory where React controller components are stored - relevant only when using symfony/asset-mapper. // Default: "%kernel.project_dir%/assets/react/controllers"
|
||||
* name_glob?: list<scalar|null|Param>,
|
||||
* }
|
||||
* @psalm-type PentatrionViteConfig = array{
|
||||
* public_directory?: scalar|null|Param, // Default: "public"
|
||||
* build_directory?: scalar|null|Param, // we only need build_directory to locate entrypoints.json file, it's the "base" vite config parameter without slashes. // Default: "build"
|
||||
* proxy_origin?: scalar|null|Param, // Allows to use different origin for asset proxy, eg. http://host.docker.internal:5173 // Default: null
|
||||
* absolute_url?: bool|Param, // Prepend the rendered link and script tags with an absolute URL. // Default: false
|
||||
* throw_on_missing_entry?: scalar|null|Param, // Throw exception when entry is not present in the entrypoints file // Default: false
|
||||
* throw_on_missing_asset?: scalar|null|Param, // Throw exception when asset is not present in the manifest file // Default: true
|
||||
* cache?: bool|Param, // Enable caching of the entry point file(s) // Default: false
|
||||
* preload?: "none"|"link-tag"|"link-header"|Param, // preload all rendered script and link tags automatically via the http2 Link header. (symfony/web-link is required) Instead <link rel="modulepreload"> will be used. // Default: "link-tag"
|
||||
* crossorigin?: false|true|"anonymous"|"use-credentials"|Param, // crossorigin value, can be false, true (default), anonymous (same as true) or use-credentials // Default: true
|
||||
* script_attributes?: list<scalar|null|Param>,
|
||||
* link_attributes?: list<scalar|null|Param>,
|
||||
* preload_attributes?: list<scalar|null|Param>,
|
||||
* default_build?: scalar|null|Param, // Deprecated: The "default_build" option is deprecated. Use "default_config" instead. // Default: null
|
||||
* builds?: array<string, array{ // Default: []
|
||||
* build_directory?: scalar|null|Param, // Default: "build"
|
||||
* script_attributes?: list<scalar|null|Param>,
|
||||
* link_attributes?: list<scalar|null|Param>,
|
||||
* preload_attributes?: list<scalar|null|Param>,
|
||||
* }>,
|
||||
* default_config?: scalar|null|Param, // Default: null
|
||||
* configs?: array<string, array{ // Default: []
|
||||
* build_directory?: scalar|null|Param, // Default: "build"
|
||||
* script_attributes?: list<scalar|null|Param>,
|
||||
* link_attributes?: list<scalar|null|Param>,
|
||||
* preload_attributes?: list<scalar|null|Param>,
|
||||
* }>,
|
||||
* }
|
||||
* @psalm-type ConfigType = array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
@@ -1473,6 +1501,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* security?: SecurityConfig,
|
||||
* monolog?: MonologConfig,
|
||||
* react?: ReactConfig,
|
||||
* pentatrion_vite?: PentatrionViteConfig,
|
||||
* "when@dev"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
@@ -1490,6 +1519,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* monolog?: MonologConfig,
|
||||
* maker?: MakerConfig,
|
||||
* react?: ReactConfig,
|
||||
* pentatrion_vite?: PentatrionViteConfig,
|
||||
* },
|
||||
* "when@prod"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
@@ -1505,6 +1535,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* security?: SecurityConfig,
|
||||
* monolog?: MonologConfig,
|
||||
* react?: ReactConfig,
|
||||
* pentatrion_vite?: PentatrionViteConfig,
|
||||
* },
|
||||
* "when@test"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
@@ -1521,6 +1552,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* security?: SecurityConfig,
|
||||
* monolog?: MonologConfig,
|
||||
* react?: ReactConfig,
|
||||
* pentatrion_vite?: PentatrionViteConfig,
|
||||
* },
|
||||
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
|
||||
* imports?: ImportsConfig,
|
||||
|
||||
Reference in New Issue
Block a user