Skip to main content

Plugin

CloudBase Framework supports a plugin mechanism and provides plugins for various application frameworks and cloud resources.

Plugins can handle processes such as building, deploying, developing, and debugging independent units within applications. For example, the website plugin can handle units like static websites, while the node plugin can manage node.js applications such as koa and express.

Plugin configurations are written in the cloudbaserc.json file. For details, please refer to the configuration instructions. Plugin configurations can be filled in manually or generated automatically.

Currently, auto-detection for configuration generation is supported for some frameworks/languages.

Auto-Detection for Plugin Configuration Generation

Run the cloudbase command directly in the project directory to perform auto-detection, generate plugin configuration files, and deploy.

cloudbase


Deploy the current project <Projects/test/test-vue> with CloudBase? (Y/n) · true
✔ Select associated environment · webpage - [webpage:pay-as-you-go]
______ __ __ ____
/ ____// /____ __ __ ____/ // __ ) ____ _ _____ ___
/ / / // __ \ / / / // __ // __ |/ __ `// ___// _ \
/ /___ / // /_/ // /_/ // /_/ // /_/ // /_/ /(__ )/ __/
\_________\____/ \__,_/ \__,_//_____/ \__,_//____/ \___/ __
/ ____/_____ ____ _ ____ ___ ___ _ __ ____ _____ / /__
/ /_ / ___// __ `// __ `__ \ / _ \| | /| / // __ \ / ___// //_/
/ __/ / / / /_/ // / / / / // __/| |/ |/ // /_/ // / / ,<
/_/ /_/ \__,_//_/ /_/ /_/ \___/ |__/|__/ \____//_/ /_/|_|


CloudBase Framework info Version v1.2.10
CloudBase Framework info Github: https://github.com/Tencent/cloudbase-framework

CloudBase Framework info EnvId webpage
? Detected a Vue.js project in the current project

🔨 Build script `npm run build`
📦 Local static files directory `dist`

Do you need to modify the default configuration? No
? Enter the unique application identifier (supports uppercase/lowercase letters, numbers, and hyphens; must be unique under the same account) test-vue
? Do you need to save the current project configuration? After saving, it won't ask again next time. Yes
CloudBase Framework info 📦 install plugins

Manually Enter Plugin Configuration

You can refer to the Configuration Guide and the corresponding plugin documentation to fill in the configuration.

Example:

{
"framework": {
"plugins": {
"client": {
"use": "@cloudbase/framework-plugin-website",
"inputs": {
"buildCommand": "npm run build",
"outputPath": "dist",
"cloudPath": "/vue"
}
},
"server": {
"use": "@cloudbase/framework-plugin-function",
"inputs": {
"functionRootPath": "cloudfunctions",
"functions": [
{
"name": "vue-echo"
}
]
}
}
}
}
}

Official Plugin List

Plugin LinkPluginLatest VersionPlugin Description
@cloudbase/framework-plugin-websiteNpm versionOne-click deployment for website applications
@cloudbase/framework-plugin-nodeNpm versionOne-click deployment for Node applications (supports underlying deployment as cloud functions or cloud hosting)
@cloudbase/framework-plugin-nuxtNpm versionOne-click deployment for Nuxt SSR applications
@cloudbase/framework-plugin-functionNpm versionOne-click deployment for function resources
@cloudbase/framework-plugin-containerNpm versionOne-click deployment for cloud hosting container services
@cloudbase/framework-plugin-dartNpm versionOne-click deployment for Dart applications
@cloudbase/framework-plugin-databaseNpm versionOne-click declarative deployment for CloudBase NoSQL databases
@cloudbase/framework-plugin-denoNpm versionOne-click deployment for Deno applications
@cloudbase/framework-plugin-nextNpm versionOne-click deployment for Next SSR applications
@cloudbase/framework-plugin-mpNpm versionOne-click deployment for WeChat Mini Program applications
@cloudbase/framework-plugin-authNpm versionOne-click setup for login configuration