sebavan 5 年之前
父节点
当前提交
9a47503540
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 3 3
      Tools/Gulp/tasks/gulpTasks-localRun.js
  2. 1 1
      azure-pipelines-cd.yml

+ 3 - 3
Tools/Gulp/tasks/gulpTasks-localRun.js

@@ -31,8 +31,8 @@ gulp.task("webserver", function () {
                 let referer = req.headers['referer'];
                 if (!baseUrl && referer) {
                     referer = referer.toLowerCase();
-                    if (referer.indexOf('/playground/') !== -1 && req.url.indexOf('/Playground/') === -1) {
-                        req.url = "/Playground/" + req.url;
+                    if (referer.indexOf('/playground/') !== -1 && req.url.toLowerCase().indexOf('/playground/') === -1) {
+                        req.url = "/playground/" + req.url;
                         res.writeHead(301, {
                             'Location': req.url
                         });
@@ -40,7 +40,7 @@ gulp.task("webserver", function () {
                     }
                     if (referer.indexOf('/localdev/') !== -1 && referer.indexOf(req.originalUrl) === -1) {
                         if (!fs.existsSync(rootRelativePath + req.originalUrl)) {
-                            req.url = "/Playground/" + req.url.replace(/localDev/ig, "");
+                            req.url = "/playground/" + req.url.replace(/localDev/ig, "");
                         }
                     }
                 }

+ 1 - 1
azure-pipelines-cd.yml

@@ -10,7 +10,7 @@ jobs:
   steps:
   - script: 'npm install netlify-cli'
     displayName: 'npm install netlify'
-  - script: 'npm install --prefix Playground/'
+  - script: 'npm install --prefix playground/'
     displayName: 'npm install playground'
   - script: 'npm install typescript'
     displayName: 'npm install typescript'