From 6827506bd489b68af80ba425928b283239a55a50 Mon Sep 17 00:00:00 2001 From: "xuken.xk" Date: Fri, 22 Jan 2021 14:22:13 +0800 Subject: [PATCH] fix: use '-!' prefix to avoid enter rml-loader multiple times --- src/rml-loader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rml-loader.js b/src/rml-loader.js index 8e305b8..f37eaf7 100644 --- a/src/rml-loader.js +++ b/src/rml-loader.js @@ -20,9 +20,9 @@ module.exports = function RMLLoader(rawContent) { const parts = preCompileParts(rawContent, resourcePath); - const loadScriptRequest = stringifyRequest(`${paths.partLoader}?part=script!${resourcePath}`); - const loadTemplateRequest = stringifyRequest(`${paths.templateLoader}?renderer=${renderer}&inlineStyle=${inlineStyle}!${paths.partLoader}?part=template!${resourcePath}`); - const loadStyleRequest = stringifyRequest(`${paths.styleLoader}!${resourcePath}`); + const loadScriptRequest = stringifyRequest(`-!${paths.partLoader}?part=script!${resourcePath}`); + const loadTemplateRequest = stringifyRequest(`-!${paths.templateLoader}?renderer=${renderer}&inlineStyle=${inlineStyle}!${paths.partLoader}?part=template!${resourcePath}`); + const loadStyleRequest = stringifyRequest(`-!${paths.styleLoader}!${resourcePath}`); let loadData; if (parts.script) {