You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples are using the .js file extension and nowhere is clarified that you need to use .ts if you are using TypeScript.
I got a bit confused, because the plugin I was extending was written in JS, and I though that there is no problem to extend it using .js files, because in the documentation it says that:
When a Strapi application is initializing, plugins, extensions and global lifecycle functions events happen in the following order:
Plugins are loaded and their interfaces are exposed.
**Files in ./src/extensions are loaded.** <---
The register() and bootstrap() functions in ./src/index.js are called.
A plugin's interface can be extended at step 2 (i.e. within ./src/extensions) or step 3 (i.e. inside ./src/index.js).
I think it would be a good idea to clarify that they won't be compiled if you are using TypeScript for the project and that you should use .ts extension.
Additional context
No response
Suggested improvements or fixes
No response
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered:
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/plugins-extension
Describe the bug
The examples are using the .js file extension and nowhere is clarified that you need to use .ts if you are using TypeScript.
I got a bit confused, because the plugin I was extending was written in JS, and I though that there is no problem to extend it using .js files, because in the documentation it says that:
I think it would be a good idea to clarify that they won't be compiled if you are using TypeScript for the project and that you should use .ts extension.
Additional context
No response
Suggested improvements or fixes
No response
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered: