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

Babel warning during build #2244

Closed
davemevans opened this issue Oct 19, 2017 · 6 comments
Closed

Babel warning during build #2244

davemevans opened this issue Oct 19, 2017 · 6 comments

Comments

@davemevans
Copy link
Contributor

davemevans commented Oct 19, 2017

When building the code, the following warning is displayed:

[BABEL] Note: The code generator has deoptimised the styling of "D:/nginx/html/dash.js-2.0/src/streaming/MediaPlayer.js" as it exceeds the max of "100KB".

This seems to be related to the compact option which we don't set so defaults to auto, which causes this warning because MediaPlayer.js is enormous.

It's not doing any harm but we should probably make a decision to set compact explicitly to either true or false to make the warning go away.

@nicosang
Copy link
Contributor

Hi @bbcrddave ,

you're right. It should also be interesting to decrease the size of this file.

Nico

@davemevans
Copy link
Contributor Author

davemevans commented Oct 25, 2017

Sadly this isn't fixed as the compact option is specified on the wrong build target - it's the browserify target that needs compact set:

Replacing transform: ['babelify'] with transform: [['babelify', {compact: true}]] should do the trick (or possibly false - see #2255 for discussion about this).

@davemevans davemevans reopened this Oct 25, 2017
epiclabsDASH added a commit that referenced this issue Oct 25, 2017
Fix #2244 - pass compact option to babelify
@nicosang
Copy link
Contributor

Hi @bbcrddave ,

after some tests, compact sould be set to false instead. Indeed, with true value, the source map seems not good. For instance, I put a break point in PlaybackController:onBytesAppended, when a seek command is called, the step into will not reached the seek code.

According to @jeffcunat , the new version (6.2) of babelify increases the limit from 100 KB to 500KB....maybe a better solution....

Nico

@nicosang nicosang reopened this Oct 30, 2017
@davemevans
Copy link
Contributor Author

Yes, I wondered if that may the case - see my comment at #2255 (comment).

Switching to babel 6 might be an option but I suspect it might be a big task.

@jeoliva
Copy link
Contributor

jeoliva commented Oct 30, 2017

Agree with @bbcrddave. As suggested by him in #2255 I think it is safer continue using current babel version and set compact to false.

davemevans added a commit to davemevans/dash.js that referenced this issue Oct 31, 2017
epiclabsDASH added a commit that referenced this issue Oct 31, 2017
Refix #2244 - pass compact false option to babelify
@davemevans
Copy link
Contributor Author

Should be closed via 30684b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants