Skip to content

本插件未声明 dsh.bundle #1

Description

@inxups

环境

DSH 0.1.5-rc.1;本插件 v1.3.0;通过 dsh plugin --profile web add github:c-ling/dsh-plugin-notify#v1.3.0 安装。

描述

package.json 只声明了 dsh.client,没有声明 dsh.bundle:

"dsh": {
  "client": { "platform": "web", "inject": [], "immediately": true }
}

由此产生的实际行为:

  1. dsh plugin add 把它当作普通依赖安装,并打印 declares no dsh.bundle — installed as a plain dependency, not a profile layer;它不会被追加进 dsh.profile.bundles。

  2. 激活需要在 ~/.dsh/profiles/web/cordis.patch.yml 手写 loader 行:

    - insert:
        - id: notify
          name: 'dsh-plugin-notify'
  3. 重启 dsh web 后插件才生效;dsh plugin remove 只移除依赖,该 loader 行需要手动删除。

README 的安装章节对此的说明是:

安装时若看到 declares no dsh.bundle — installed as a plain dependency 的提示属正常现象:本插件不是 profile bundle 层,而是通过下面的 loader 行激活。

DSH 官方文档(docs/user/develop/basic/publish.zh.md)对未声明 dsh.bundle 的定位是:适用于「一个库供插件包 import,而不是供用户启用」的包。

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions