UNPKG

@cloudbase/app

Version:
25 lines (22 loc) 697 B
const path = require('path') const params = { context: path.resolve(__dirname, '../'), mode: 'production', watch: false, entry: path.resolve(__dirname, '../src/index.ts'), output: { path: path.resolve(__dirname, '../dist/miniprogram'), filename: 'index.js', library: `tcboauth`, libraryTarget: 'umd', umdNamedDefine: true, globalObject: 'typeof window !== "undefined"?window:this', }, externals: {}, definePlugin: { 'process.env.NODE_ENV': JSON.stringify('production'), // 注入环境变量,用于业务代码判断 'process.env.IS_MP_BUILD': 'true', 'globalThis.IS_MP_BUILD': true, }, } module.exports = require('./web.prod.js')(params)