mirror of
https://gitee.com/openharmony/third_party_weex-loader
synced 2024-11-27 01:20:23 +00:00
commit
3e801a0759
@ -286,7 +286,8 @@ export function parseRequireModule (source, resourcePath) {
|
||||
for (let requireStatement of requireStatements) {
|
||||
const requireStatementExec = /\((\"|\')(.+)(\"|\')\)/.exec(requireStatement);
|
||||
if (requireStatement.match(REG_SYSTEM) && requireStatementExec && requireStatementExec.length > 3) {
|
||||
if (systemModules.length == 0 || systemModules.includes(requireStatementExec[2] + '.d.ts')) {
|
||||
if (systemModules.length == 0 || systemModules.includes(requireStatementExec[2] + '.d.ts') ||
|
||||
process.env.DEVICE_LEVEL === 'lite') {
|
||||
source = source.replace(requireStatement, requireStatement.replace('require', 'requireModule'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user