提交 e7afc4d7 编写于 作者: fxy060608's avatar fxy060608 提交者: qiang

fix(uts): 生成wgt、本地资源时,不拷贝加密插件目录

上级 43857a90
......@@ -44,8 +44,15 @@ export async function compileEncrypt(pluginDir: string, isX = false) {
? createRollupCommonjsCode(pluginDir, pluginRelativeDir)
: createWebpackCommonjsCode(pluginRelativeDir)
if (process.env.NODE_ENV !== 'development') {
// 复制插件目录
fs.copySync(pluginDir, join(outputDir, pluginRelativeDir))
// 生成wgt和本地生成资源,无需复制加密插件目录
const needCopy = !(
process.env.UNI_APP_PRODUCTION_TYPE === 'WGT' ||
process.env.UNI_APP_PRODUCTION_TYPE === 'LOCAL_PACKAGING'
)
if (needCopy) {
// 复制插件目录
fs.copySync(pluginDir, join(outputDir, pluginRelativeDir))
}
return {
dir: outputPluginDir,
code,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册