Skip to content

[Bug]: Typescript local plugin #3025

Description

@mydesweb

Link to the documentation page or resource

https://docs.strapi.io/cms/plugins-development/create-a-plugin

Describe the bug

I followed the documentation to create a local TypeScript-only plugin, but I’m encountering a lot of issues, such as the following:

TS6142: Module ./components/PluginIcon was resolved to /path/to/cms/src/plugins/plugin-name/admin/src/components/PluginIcon.tsx
, but --jsx is not set.

TS2307: Cannot find module @strapi/strapi/admin or its corresponding type declarations.

Additional context

I removed all tsconfig.json files from the admin and server folders, as well as the package.json files inside the plugin. I then created strapi-server.ts and strapi-admin.ts at the plugin root level, which re-export admin/src/index.ts and server/src/index.ts.

Suggested improvements or fixes

It’s not clear how to configure a local TypeScript plugin. I just need a simple plugin to extend my project’s functionality—there’s no need to configure plugin devDependencies, run watch scripts, or build it separately. It should simply be part of my project.

Related issue(s)/PR(s)

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions