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

Support for Angular 8 #3

Open
sebastianhaeni opened this issue May 29, 2019 · 14 comments
Open

Support for Angular 8 #3

sebastianhaeni opened this issue May 29, 2019 · 14 comments
Labels
enhancement New feature or request

Comments

@sebastianhaeni
Copy link

sebastianhaeni commented May 29, 2019

In Angular 8, there were some changes in the builder API and it's no longer compatible with the new version besides package.json version requirements.

Error:

Could not find the implementation for builder angular-builder-custom-terser-options:browser-custom-terser
Error: Could not find the implementation for builder angular-builder-custom-terser-options:browser-custom-terser
    at WorkspaceNodeModulesArchitectHost.resolveBuilder (/Users/foo/bar/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:49:19)
...
@aigoncharov aigoncharov added the enhancement New feature or request label Jun 4, 2019
@nbarrett
Copy link

👍 I've upvoted to bring terser customization into angular's default builder, as this I'm finding this builder really useful for my project where I want to see which component is performing the logging. So I agree that support for angular 8 would be a good enhancement to implement soon. I'll take a look to see whether I can submit a PR to help this along 😄

@JAspeling
Copy link

Hello @keenondrums - do you have an idea of when the Angular 8 support will be released? Would like test this, our project was recently upgraded to Angular 8 and the constructor.name is required. Thanks!

@nbarrett
Copy link

nbarrett commented Sep 1, 2019

Is it as simple as creating a PR with peerDependencies tweaked as follows?

  "peerDependencies": {
    "@angular-devkit/build-angular": ">= ^0.13.2",
    "@angular/compiler-cli": ">= ^7.2.5",
    "@angular/compiler": ">= ^7.2.5",
    "@angular/core": ">= ^7.2.5",
    "terser-webpack-plugin": "^1.2.2"
  }

If so, I can do that pretty easily?

@JAspeling
Copy link

If the fix is in master, and you look at the recent commits, I doubt those are the only changes. Not too sure though

@nbarrett
Copy link

nbarrett commented Sep 1, 2019

@JAspeling, yes you are absolutely right, I didn't notice the latest commit which indeed contains more changes.

@aigoncharov
Copy link
Owner

Guys, the fix is indeed in master, but I didn't have time to test it. As soon as I do, I'll make it an official release.

@JAspeling
Copy link

JAspeling commented Sep 2, 2019

Just a heads up - I compiled the code using npm run prepack and copied the dist folder into the package in my node_modules, and it's still giving the same error. Not sure if that's the right way of using the master branch though.

@JAspeling
Copy link

It seems it was complaining about the implementation being missing because node-modules-architect-host.js is looking for the implementation property on the builder which doesnt exist. Added that, the build on my angular 8 project succeeds.

However the issue seems to still persist.

@P3tronius
Copy link

Upvoting!
Since ng 8.2.4+ there is an issue with Terser and tinymce on a unicode regex, the only workaround is to set ascii_only: true using your builder.

@aigoncharov
Copy link
Owner

aigoncharov commented Sep 21, 2019

I published 2.0.0-alpha.0. It works if es5 differential loading is disabled. Unfortunately, I don't have time to make it work as it seems to require re-writing too much code. My bud reported this set of builders works well. Try it instead of this one. Another way to go around the issue is to monkey-patch minify from Terser.

@yantrab
Copy link

yantrab commented Oct 29, 2019

Hi @aigoncharov can you please give as some repo example how to use angular-builders to keep class names?

@aigoncharov
Copy link
Owner

@yantrab which version of Angular are you using?

@yantrab
Copy link

yantrab commented Oct 29, 2019

Angular 8

@sebastianhaeni
Copy link
Author

We are actually migrating our current codebase to be minify-friendly so it doesn't depend on relaxed terser options. That's the other option people have and actually should go for.

Thanks for the plugin, but we are no longer using it :)

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

No branches or pull requests

6 participants