1.0.0 • Published 9 months ago
@plugin-light/webpack-plugin-manifest-expose v1.0.0
暴露 manifest.json
暴露 uni-app 中的 manifest.json,挂载在 window 上。
如何使用
安装
pnpm add @plugin-light/webpack-plugin-manifest-expose -D在 vue.config.js 中添加如下设置:
const { ManifestExposePlugin } = require('@plugin-light/webpack-plugin-manifest-expose');
module.exports = {
chainWebpack(config) {
config.plugin('ManifestExposePlugin')
.use(new ManifestExposePlugin())
.tap(args => args);
}
}参数
export interface IManifestExposeOptions {
// 默认为 'jsonpScriptSrc',
jsSrc?: string;
// 默认为 'cssSrc',
cssSrc: string;
}