lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 136 forks source link

Size limit error #194

Closed nebarf closed 7 years ago

nebarf commented 7 years ago

I got this warning when I run npm test

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB).
This can impact web performance.
Assets:
  0.bundle.js (2.5 MB)
  test (3.01 MB)
  src/test.ts (7.23 MB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (250 kB). This can impact web performance.
Entrypoints:
  test (3.01 MB)
      test

  src/test.ts (7.23 MB)
      src/test.ts

Have you any idea why it's triggered?

P.S. same error in a personal project and in your sample project as well

lathonez commented 7 years ago

no idea, not seen it before anywhere. doesn't happen for me locally or on CI.

What exactly are you doing to trigger this? I can't find any reference to those warning logs in the entire codebase (including node modules).

Are you running from within an editor?

qng5150 commented 7 years ago

I'm seeing this as well. Not sure if it's related to this npm WARN @ngtools/webpack@1.1.9 requires a peer of @angular/compiler-cli@2.2.3 but none was installed. npm WARN @ngtools/webpack@1.1.9 requires a peer of @angular/core@2.2.3 but none was installed.

nebarf commented 7 years ago

I've cloned your repo, installed dependencies and run the test using npm test. I run all npm commands from windows prompt.

@shinta5150 I also noticed that missed dependencies

lathonez commented 7 years ago

No idea I'm afraid.

On 15 Dec 2016 09:34, "Francesco" notifications@github.com wrote:

I've cloned your repo, installed dependencies and run the test using npm test. I run all npm commands from windows prompt.

@shinta5150 https://github.com/shinta5150 I also noticed that missed dependencies

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/194#issuecomment-267281763, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSMzKKUwLnSHejY_BNEtAmSAIHR8Gks5rIQm2gaJpZM4LNK_S .

lathonez commented 7 years ago

Replicated: https://ci.appveyor.com/project/lathonez/clicker/build/1.0.1

nebarf commented 7 years ago

I noticed that warning occurs only if I install all npm dependencies through npm install (no _nodemodules dir). If I add test dependencies on an already created project then no warning is shown.

lathonez commented 7 years ago

am now getting this on arch mid rc4 upgrade, so hopefully will be able to resolve / provide more info

lathonez commented 7 years ago
x220:~/code/clicker$ grep -rns "The following asset(s)" node_modules/
node_modules/webpack/lib/performance/AssetsOverSizeLimitWarning.js:17:  this.message = "asset size limit: The following asset(s) exceed the recommended size limit (" + SizeFormatHelpers.formatSize(assetLimit) + "). \n" +
lathonez commented 7 years ago

https://github.com/webpack/webpack/pull/3350

lathonez commented 7 years ago

https://github.com/webpack/webpack/blob/master/schemas/webpackOptionsSchema.json#L769-L804

lathonez commented 7 years ago

see here for a discussion on why we currently can't modify webpack config:

https://github.com/angular/angular-cli/issues/1656

lathonez commented 7 years ago

TL;dr: