You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If the path to the app contains "%20" the app doesn't work at all #8118
changed the title [-]If the path to the app contains %20 the app doesn't work at all[/-][+]If the path to the app contains "%20" the app doesn't work at all[/+]on Oct 22, 2017
this caused by webpack-dev-middleware module which consider the path as an encoded url so %20 is transformed to space.
Here is where it happens:
function getFilenameFromUrl(publicPath, outputPath, url) {
var filename;
// localPrefix is the folder our bundle should be in
var localPrefix = urlParse(publicPath || "/", false, true);
var urlObject = urlParse(url);
// publicPath has the hostname that is not the same as request url's, should fail
if(localPrefix.hostname !== null && urlObject.hostname !== null &&
localPrefix.hostname !== urlObject.hostname) {
return false;
}
// publicPath is not in url, so it should fail
if(publicPath && localPrefix.hostname === urlObject.hostname && url.indexOf(publicPath) !== 0) {
return false;
}
// strip localPrefix from the start of url
if(urlObject.pathname.indexOf(localPrefix.pathname) === 0) {
filename = urlObject.pathname.substr(localPrefix.pathname.length);
}
if(!urlObject.hostname && localPrefix.hostname &&
url.indexOf(localPrefix.path) !== 0) {
return false;
}
// and if not match, use outputPath as filename
I imagined something like that was the cause, this issue isn't really a blocker for me since it's easy to work around it, but until I figured it out I wasted a couple of days scratching my head.
I just want to avoid future people from encountering this issue.
Looks like a problem with old version of the CLI. Let us close the issue for now. If it's still relevant, please open a new ticket with steps to reproduce and a minimal demo. Thanks!
Activity
[-]If the path to the app contains %20 the app doesn't work at all[/-][+]If the path to the app contains "%20" the app doesn't work at all[/+]dinerotah commentedon Jan 17, 2018
this caused by
webpack-dev-middlewaremodule which consider the path as an encoded url so%20is transformed to space.Here is where it happens:
using
lite-serverand --watch fix the problem.ludat commentedon Jan 28, 2018
I imagined something like that was the cause, this issue isn't really a blocker for me since it's easy to work around it, but until I figured it out I wasted a couple of days scratching my head.
I just want to avoid future people from encountering this issue.
mgechev commentedon Aug 19, 2019
Looks like a problem with old version of the CLI. Let us close the issue for now. If it's still relevant, please open a new ticket with steps to reproduce and a minimal demo. Thanks!
angular-automatic-lock-bot commentedon Sep 19, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.