Skip to content

Forces a project to include vite/rollup/esbuild dependencies #349

Description

@rchl

Environment

Node 18, Nuxt 2

Reproduction

Create a Nuxt 2 project that uses @nuxtjs/sentry and @sentry/webpack-plugin and try to type check the project using tsc.

Will get errors like:

node_modules/unplugin/dist/index.d.ts(1,40): error TS2305: Module '"rollup"' has no exported member 'AcornNode'.
node_modules/unplugin/dist/index.d.ts(5,36): error TS2307: Cannot find module 'vite' or its corresponding type declarations.
node_modules/unplugin/dist/index.d.ts(6,38): error TS2307: Cannot find module 'vite' or its corresponding type declarations.
node_modules/unplugin/dist/index.d.ts(7,49): error TS2307: Cannot find module 'esbuild' or its corresponding type declarations.
node_modules/unplugin/dist/index.d.ts(8,41): error TS2307: Cannot find module 'esbuild' or its corresponding type declarations.

Describe the bug

I'm using @nuxtjs/sentry with @sentry/webpack-plugin for creating releases. Since the @sentry/webpack-plugin uses unplugin, this indirectly makes the project require dependencies like vite, rollup and esbuild even though Nuxt 2 project doesn't use those.

skipLibCheck could be a solution for some but it's not ideal since it can hide real issues in the project.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions