Skip to content

Commit

Permalink
fix: update miniprogram rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
JujieX committed Jul 31, 2024
1 parent 51a424c commit bcb9ed8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rollup.miniprogram.plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ const adapterArray = [
"WebGL2RenderingContext",
"ImageData",
"location",
"OffscreenCanvas",
"OffscreenCanvas"
];
const adapterVars = {};

adapterArray.forEach((name) => {
adapterVars[name] = register(name);
});

const regStr = [`"@galacean/engine"`, `'@galacean/engine'`].join("|");
const regStr = [`"@galacean/engine"`].join("|");

export default [
inject(adapterVars),
modify({
find: new RegExp(regStr, "g"),
replace: (match, moduleName) => {
return `${match.substr(0, match.length - 1)}/dist/miniprogram"`;
},
}),
}
})
];

0 comments on commit bcb9ed8

Please sign in to comment.