mirror of
https://gitee.com/openharmony/third_party_weex-loader
synced 2024-11-23 07:20:51 +00:00
commit
e0ef13a9bf
@ -286,7 +286,7 @@ 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