Skip to content

[Bug] Exclude mismatch config with UI #210

@luchillo17

Description

@luchillo17

In basic terms, this works in the UI, but when the exclude filters are provided through the Vite config, nothing happens:

  • This in the UI exclude input works **/node_modules/date-fns/**,**/node_modules/lodash-es/**,**/node_modules/lucide-react/**.
  • This in the vite plugin's config doesn't work:
  plugins: [
    tailwindCSS(),
    react(),
    tsconfigPaths(),
    ...prodOnlyPlugins,
    // unusedCode({
    //   patterns: ['src/**/*.*'],
    //   exclude: [
    //     'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
    //     '**/schema/**',
    //     'src/components/ui/**',
    //   ],
    //   exportJSON: true,
    // }),
    visualizer({
      open: true,
      template: 'network',
      exclude: [
        { file: '**/node_modules/date-fns/**' },
        { file: '**/node_modules/lodash-es/**' },
        { file: '**/node_modules/lucide-react/**' },
      ],
    }),
  ],

vite.config.ts

stats.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions