Commit b2b6d191 authored by rockyl's avatar rockyl

修复打包问题

parent 15af4432
......@@ -276,9 +276,9 @@ async function divideCode(data, {debug, compile, uglify, getProcesses, getScript
data.customs = customMetas.map(item => {
const custom = typeof item === 'string' ? JSON.parse(item) : item;
customManager.deal(custom);
let assetMapping = customs.find(c => c.id === item.id).assetMapping;
let assetMapping = customs.find(c => c.id === custom.id).assetMapping;
for(let uuid in assetMapping){
let asset = item.assets.find(item=>item.uuid === uuid);
let asset = custom.assets.find(item=>item.uuid === uuid);
if(asset){
asset.url = assetMapping[uuid];
}
......
This diff is collapsed.
......@@ -282,9 +282,9 @@ async function divideCode(data, {debug, compile, uglify, getProcesses, getScript
data.customs = customMetas.map(item => {
const custom = typeof item === 'string' ? JSON.parse(item) : item;
customManager.deal(custom);
let assetMapping = customs.find(c => c.id === item.id).assetMapping;
let assetMapping = customs.find(c => c.id === custom.id).assetMapping;
for(let uuid in assetMapping){
let asset = item.assets.find(item=>item.uuid === uuid);
let asset = custom.assets.find(item=>item.uuid === uuid);
if(asset){
asset.url = assetMapping[uuid];
}
......
This diff is collapsed.
......@@ -282,9 +282,9 @@ ${scripts}
data.customs = customMetas.map(item => {
const custom = typeof item === 'string' ? JSON.parse(item) : item;
customManager.deal(custom);
let assetMapping = customs.find(c => c.id === item.id).assetMapping;
let assetMapping = customs.find(c => c.id === custom.id).assetMapping;
for(let uuid in assetMapping){
let asset = item.assets.find(item=>item.uuid === uuid);
let asset = custom.assets.find(item=>item.uuid === uuid);
if(asset){
asset.url = assetMapping[uuid];
}
......
This diff is collapsed.
{
"name": "zeroing-code-divider",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/index.js",
"module": "dist/index.es.js",
"license": "MIT",
......
......@@ -100,9 +100,9 @@ export async function divideCode(data, {debug, compile, uglify, getProcesses, ge
data.customs = customMetas.map(item => {
const custom = typeof item === 'string' ? JSON.parse(item) : item;
customManager.deal(custom);
let assetMapping = customs.find(c => c.id === item.id).assetMapping;
let assetMapping = customs.find(c => c.id === custom.id).assetMapping;
for(let uuid in assetMapping){
let asset = item.assets.find(item=>item.uuid === uuid);
let asset = custom.assets.find(item=>item.uuid === uuid);
if(asset){
asset.url = assetMapping[uuid];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment