Skip to content

[Question] 0.1.32 umd打包如何生成 xxx.d.ts 文件 #131

Description

@wuchendi

Hey, man.

我目前在投入 lowcode 相关工作,在 lowcode 当中,我注意到他们使用了 "@alib/build-scripts": "^0.1.32" 进行构建和打包。

然而,我目前无法找到关于这个配置的任何文档。如果您了解相关信息,是否能够分享给我呢?

我的问题是,在生成 UMD 文件时,应该如何生成 xxx.d.ts 文件?以下是我的配置文件:

  • package.json
{
  "scripts": {
    "build": "build-scripts build && build-scripts build --config=build.umd.json"
  }
}
  • build.umd.json
{
  "entry": {
    "vue-renderer": "./src/index.ts"
  },
  "sourceMap": true,
  "library": "LCVueRenderer",
  "libraryTarget": "umd",
  "externals": {
    "vue": "var window.Vue"
  },
  "outputAssetsPath": {
    "js": "",
    "css": ""
  },
  "polyfill": false,
  "outputDir": "dist",
  "vendor": false,
  "ignoreHtmlTemplate": true,
  "plugins": [
    "build-plugin-react-app",
    ["build-plugin-moment-locales", { "locales": ["zh-cn"] }],
    "./build.plugin.cjs"
  ]
}

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions