angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.74k stars 11.98k forks source link

Are ejected configs incompatible with Continuous Integration? #8337

Closed darkbasic closed 6 years ago

darkbasic commented 6 years ago

Angular-cli 1.5.0 fills my webpack.config.js with tons of aliases like

"rxjs/AsyncSubject": "/home/niko/WebstormProjects/angularcli-meteor/node_modules/rxjs/_esm5/AsyncSubject.js"

Obviously the absolute path will not match on CI, while I didn't manage to make relative paths (like node_modules/rxjs/_esm5/AsyncSubject.js) work. What should I do?

ivenxu commented 6 years ago

I have the same problem. I'm wondering why only rxjs has this problem but other imports don't.

AdrienRedon commented 6 years ago

Same as well. I had to replace every absolute path for rxjs with


path.resolve(__dirname, 'relative/path')
darkbasic commented 6 years ago

The same is true if you eject it with the --prod flag:

    new LicenseWebpackPlugin({
      "licenseFilenames": [
        "LICENSE",
        "LICENSE.md",
        "LICENSE.txt",
        "license",
        "license.md",
        "license.txt"
      ],
      "perChunkOutput": false,
      "outputTemplate": "/home/niko/WebstormProjects/angularcli-meteor/node_modules/license-webpack-plugin/output.template.ejs",

As you can see the outputTemplate of the LicenseWebpackPlugin has absolute paths too.

darkbasic commented 6 years ago

@hansl should I open a separate bug report for LicenseWebpackPlugin? We still have absolute paths in the prod config... Do you have any ETA for a release including that fix?

angular-automatic-lock-bot[bot] commented 5 years ago

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.