File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ const RemixPackages = [
1515 '@remix-run/serve' ,
1616 '@remix-run/dev' ,
1717]
18+ const ReactRouterPackages = [
19+ '@react-router/node' ,
20+ '@react-router/react' ,
21+ '@react-router/serve' ,
22+ '@react-router/dev' ,
23+ ]
1824const NextJsPackages = [
1925 'next' ,
2026]
@@ -57,6 +63,7 @@ export async function react(
5763
5864 const isAllowConstantExport = ReactRefreshAllowConstantExportPackages . some ( i => isPackageExists ( i ) )
5965 const isUsingRemix = RemixPackages . some ( i => isPackageExists ( i ) )
66+ const isUsingReactRouter = ReactRouterPackages . some ( i => isPackageExists ( i ) )
6067 const isUsingNext = NextJsPackages . some ( i => isPackageExists ( i ) )
6168
6269 const plugins = pluginReact . configs . all . plugins
@@ -125,7 +132,7 @@ export async function react(
125132 'generateViewport' ,
126133 ]
127134 : [ ] ) ,
128- ...( isUsingRemix
135+ ...( isUsingRemix || isUsingReactRouter
129136 ? [
130137 'meta' ,
131138 'links' ,
You can’t perform that action at this time.
0 commit comments