vaderjs 1.3.3-alpha-124 → 1.3.3-alpha-126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vader.js +4 -5
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -955,15 +955,14 @@ async function Build() {
|
|
|
955
955
|
if(provider){
|
|
956
956
|
|
|
957
957
|
let redirectFile = fs.existsSync(process.cwd() + '/dist/' + provider) ? fs.readFileSync(process.cwd() + '/dist/' + provider, 'utf8') : ''
|
|
958
|
-
let type = provider === '_redirect' ? 'text/plain' : 'application/json'
|
|
959
|
-
let root =
|
|
960
|
-
|
|
958
|
+
let type = provider === '_redirect' ? 'text/plain' : 'application/json'
|
|
959
|
+
let root = obj.url.includes(':') ? obj.url.split(':')[0] : obj.url
|
|
961
960
|
switch(true){
|
|
962
961
|
case root === '/':
|
|
963
962
|
break;
|
|
964
|
-
case 'text/plain' && !redirectFile.includes(
|
|
963
|
+
case 'text/plain' && !redirectFile.includes(obj.url):
|
|
965
964
|
|
|
966
|
-
redirectFile += `\n${root}
|
|
965
|
+
redirectFile += `\n${root}${isParamRoute ? '*' : '/'} ${obj.url}/index.html 200`
|
|
967
966
|
fs.writeFileSync(process.cwd() + '/dist/' + provider, redirectFile)
|
|
968
967
|
console.log(`Added ${root}/* ${root} 200 to ${provider}`)
|
|
969
968
|
break;
|