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

CommonJS warnings of transitive dependencies and custom style imports #18526

Closed
2 of 15 tasks
ms-dosx86 opened this issue Aug 14, 2020 · 2 comments · Fixed by #18528
Closed
2 of 15 tasks

CommonJS warnings of transitive dependencies and custom style imports #18526

ms-dosx86 opened this issue Aug 14, 2020 · 2 comments · Fixed by #18528
Assignees
Milestone

Comments

@ms-dosx86
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

After upgrading to v10 warnings appeared about CommonJS imports which is ok, but also there are warnings of transitive dependencies and warnings of style imports. We have our custom webpack config which changes the angular webpack config by using `css-loader` instead of `raw-loader` for `.less` files. There is a PR #18518 which fixes those warnings.

🔬 Minimal Reproduction

Here is a hello-world angular app where you can find everything.
https://github.com/ms-dosx86/commonjs-warnings-repro

@ms-dosx86
Copy link
Author

As an alternative solution maybe add a check rawRequest.startWith('!!'), because in case with css-loader the rawRequest looks like !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/postcss-loader/src/index.js??ref--12-2!../../../../../../../node_modules/less-loader/dist/cjs.js!./style.less'.

@alan-agius4 alan-agius4 added area: devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix labels Aug 14, 2020
@ngbot ngbot bot added this to the Backlog milestone Aug 14, 2020
@alan-agius4 alan-agius4 self-assigned this Aug 14, 2020
alan-agius4 added a commit that referenced this issue Aug 14, 2020
… dependencies in AOT mode

At the moment in AOT mode if a CommonJS dependency has transitive CommonJS dependency we are issue warning for both.

With this change we align the behaviour with JIT mode, where we issue warnings only for direct CommonJS dependencies or ES dependencies which have CommonJS dependencies.

Closes #18526
alan-agius4 added a commit that referenced this issue Aug 14, 2020
… dependencies in AOT mode

At the moment in AOT mode if a CommonJS dependency has transitive CommonJS dependency we are issue warning for both.

With this change we align the behaviour with JIT mode, where we issue warnings only for direct CommonJS dependencies or ES dependencies which have CommonJS dependencies.

Closes #18526

(cherry picked from commit bbe83ae)
@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 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants