Skip to content

暴露 manifest.json

暴露 uni-app 中的 manifest.json,挂载在 window 上。

如何使用

安装

bash
pnpm add @plugin-light/webpack-plugin-manifest-expose -D

vue.config.js 中添加如下设置:

ts
const { ManifestExposePlugin } = require('@plugin-light/webpack-plugin-manifest-expose');


module.exports = {
  chainWebpack(config) {
    config.plugin('ManifestExposePlugin')
      .use(new ManifestExposePlugin())
      .tap(args => args);
  }
}

参数

ts
export interface IManifestExposeOptions {
  // 默认为 'jsonpScriptSrc',
  jsSrc?: string;

  // 默认为 'cssSrc',
  cssSrc: string;
}

更新日志

点此查看