dominique-mueller / angular-notifier

A well designed, fully animated, highly customizable, and easy-to-use notification library for your Angular application.
https://www.npmjs.com/package/angular-notifier
MIT License
247 stars 68 forks source link

Explicitly setting the "sideEffect" property in project's package.json #186

Closed jaydiablo closed 3 years ago

jaydiablo commented 4 years ago

Fixes #183

By adding this property to the project's package.json file, angular-cli will insert it into the dist package.json like so:

"sideEffects": [
    "*.scss",
    "*.css"
  ],

Which tells Webpack that files that match these patterns have side effects, so they shouldn't be tree-shaken.

codecov[bot] commented 3 years ago

Codecov Report

Merging #186 (992c1f6) into develop (19e7e95) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #186   +/-   ##
========================================
  Coverage    99.11%   99.11%           
========================================
  Files           14       14           
  Lines          454      454           
  Branches        76       76           
========================================
  Hits           450      450           
  Misses           4        4           
dominique-mueller commented 3 years ago

Crazy ... I find it interesting enough that ng-packagr / angular-cli adds this property by default, but I would have never guessed that it actually affects files other than plain JavaScript. Webpack being super-intelligent here, I guess. Might explain the issues some people experience with the styles.

Thanks for the PR! Going out in a bug fix release the next days.