angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

[es2015, angular/material, moment.js] Strange function transformation

Open mantyz opened this issue 8 years ago • 5 comments

Versions

Angular CLI: 1.7.4
Node: 8.11.1
OS: linux x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.2.4
@angular/cli: 1.7.4
@angular/material-moment-adapter: 5.2.4
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

Repro steps

Initial issue contains repro steps.

Observed behavior

Strange daysInMonth function transformation with target=es2015 View details in comment https://github.com/angular/material2/issues/10347#issuecomment-378780775

Desired behavior

I want to see a working material datepicker.

Mention any other details that might be useful (optional)

mantyz avatar Apr 06 '18 19:04 mantyz

Opened an issue for UglifyJS https://github.com/mishoo/UglifyJS2/issues/3055

mantyz avatar Apr 06 '18 19:04 mantyz

@mantyz can you try with --build-optimizer=false? Build Optimizer does not support es2015.

filipesilva avatar Apr 09 '18 10:04 filipesilva

@filipesilva, Yes, it works with --build-optimizer = false. But it also works with sets various --prod flags where --build-optimizer = true.

ng build --aot=true --environment=prod --output-hashing=all --sourcemaps=false \
--extract-css=true --named-chunks=false --build-optimizer=true

This page does not indicate that you need to disable --build-optimizer for es2015 support.

mantyz avatar Apr 09 '18 14:04 mantyz

I'm sorry, but we can't reproduce the problem following the instructions you provided. Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue. Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.

If the problem persists, please open a new issue following our submission guidelines.

A good way to make a minimal repro is to create a new app via ng new repro-app and add the minimum possible code to show the problem. Then you can push this repository to github and link it here.

alan-agius4 avatar May 13 '19 10:05 alan-agius4

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.