@tyran8x/plugins
v2.0.1
Published
This directory is used to store third-party libraries and their related plugins integrated into the project. Each plugin contains reusable logic, configuration, and components, facilitating unified management and invocation within the project.
Readme
@tyran8x/plugins
This directory is used to store third-party libraries and their related plugins integrated into the project. Each plugin contains reusable logic, configuration, and components, facilitating unified management and invocation within the project.
Note
All third-party plugins must be imported in the form of subpath, for example:
Taking echarts as an example, the import method is as follows:
packages.json
"exports": {
"./echarts": {
"types": "./src/echarts/index.ts",
"default": "./src/echarts/index.ts"
}
}Usage
import { useEcharts } from '@tyran8x/plugins/echarts';The benefit of doing this is that the application can choose whether to use the plugin on its own, without increasing the bundle size due to the introduction and side effects of the plugin, just importing the needed plugins.
