Skip to content

fix(@angular/cli): Windows friendly tilde path resolution #9087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

douglasduteil
Copy link
Contributor

Ensure that, on Windows, the path doesn't contain back slashes to be PostCSS friendly :)

Following #8791
Closes #9077 #9061 #9080

Ensure that, on Windows, the path doesn't contain back slashes to be PostCSS friendly :)

Following angular#8791
Closes angular#9077 angular#9061 angular#9080
@maa105
Copy link

maa105 commented Jan 4, 2018

this works thanks!

@clydin
Copy link
Member

clydin commented Jan 4, 2018

Thank you for the contribution. However, please comment and/or review existing PRs before creating separate ones. Fixes and improvements may be happening locally and not yet pushed.

@clydin clydin closed this Jan 4, 2018
@maa105
Copy link

maa105 commented Jan 5, 2018

gulp.task('fix', function () {

  var line = 'url: ({ url }) => path.join(projectRoot, \'node_modules\', url.substr(1)),';

  var replacement = 'url: ({ url }, { file }) => { const relativePathToRoot = path.relative(file, projectRoot);return path.join(relativePathToRoot, \'node_modules\', url.substr(1)).replace(/\\\\/g, \'/\'); },';
  
  var fileName = 'frontend\\node_modules\\@angular\\cli\\models\\webpack-configs\\styles.js';

  var fileContent = fs.readFileSync(fileName, { encoding: 'utf8' });

  var fileReplaced = fileContent.replace(line, replacement);

  fs.writeFileSync(fileName, fileReplaced, { encoding: 'utf8' });
});

this is a gulp task that does this fix until it becomes available, hope it helps

@douglasduteil douglasduteil deleted the patch-1 branch January 8, 2018 15:10
@douglasduteil
Copy link
Contributor Author

@clydin > Sorry 😖

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants