Skip to content

Commit

Permalink
Housekeep react-router plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Feb 10, 2025
1 parent 0747255 commit 3ead7b9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/knip/src/plugins/react-router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { IsPluginEnabled, Plugin, ResolveEntryPaths } from '../../types/con
import { toEntry } from '../../util/input.js';
import { join } from '../../util/path.js';
import { hasDependency, load } from '../../util/plugin.js';
import vite from '../vite/index.js';
import type { PluginConfig, RouteConfigEntry } from './types.js';

// https://reactrouter.com/start/framework/routing
Expand All @@ -14,11 +13,7 @@ const enablers = ['@react-router/dev'];

const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);

const config: string[] = ['react-router.config.{js,ts}', ...vite.config];

const entry: string[] = [];

const production: string[] = [];
const config = ['react-router.config.{js,ts}'];

const resolveEntryPaths: ResolveEntryPaths<PluginConfig> = async (localConfig, options) => {
const { configFileDir } = options;
Expand Down Expand Up @@ -59,7 +54,5 @@ export default {
enablers,
isEnabled,
config,
entry,
production,
resolveEntryPaths,
} satisfies Plugin;

0 comments on commit 3ead7b9

Please sign in to comment.