Skip to content
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

feat: replace absolute paths for relative ones on webpack when ejected #9998

Closed
klauskpm opened this issue Mar 18, 2018 · 2 comments
Closed

Comments

@klauskpm
Copy link
Contributor

klauskpm commented Mar 18, 2018

Versions

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.7.3 (e)
Node: 8.9.3
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack-dev-server: 2.11.2
webpack: 3.11.0

Windows (10) and macOS (Sierra)

Observed behavior

When ejecting a project with ng eject it generates/shows the Webpack configuration file using absolute paths. This makes it harder for collaboration, or creating functional examples, for cross-platform teams. In a project created, and ejected, on Windows I had to change the following lines, of the webpack.config.js, on macOS: 148, 151, 154, 187, 206, 233, 258, 284, 304, 332, 358, 396, 425, 491, 494.

Case

Example of project created on Windows
Example of project created on macOS

Desired behavior

Replace the existing absolute paths for relative ones. It could use path#join(or path#resolve), as some cases are using, to achieve that. Today, I'm solving this by changing it by hand.

@klauskpm klauskpm changed the title Feature Request: replace absolute paths for relative ones on webpack when ejected feat: replace absolute paths for relative ones on webpack when ejected Mar 18, 2018
@clydin
Copy link
Member

clydin commented Sep 28, 2018

eject functionality is no longer available in the latest version (6.x+). For custom webpack configurations the following unofficial add-on is a suggested solution: https://github.com/manfredsteyer/ngx-build-plus

@clydin clydin closed this as completed Sep 28, 2018
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants