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

Not working with build optimizer enabled on Angular CLI #102

Closed
ceolinwill opened this issue Jan 16, 2018 · 6 comments
Closed

Not working with build optimizer enabled on Angular CLI #102

ceolinwill opened this issue Jan 16, 2018 · 6 comments

Comments

@ceolinwill
Copy link

The latest version of the library isn't working when enabling the build-optimizer flag using the Angular CLI (1.6.4). I get an Uncaught TypeError: Cannot read property 'call' of undefined error.

Steps to set up and reproduce

ng new quill --routing
yarn add ngx-quill

Import QuillModule in the app.module

ng build --env=prod --aot --build-optimizer

Then, try opening the dist folder. The error above will be logged into the console. Maybe related to #74?

@KillerCodeMonkey
Copy link
Owner

i will check this ... hopefully this week. Or you can try to solve it

@patrick-nurt
Copy link

Has anyone managed to solve this one?

@KillerCodeMonkey
Copy link
Owner

there is an issue in the angular cli repo: angular/angular-cli#6196

and check the first answer here:
https://stackoverflow.com/questions/46720805/cannot-read-property-call-of-undefined-angular-2-build-error-potential-solu

hopefully that helps.

@ceolinwill
Copy link
Author

It should have been fixed with @angular-devkit/build-optimizer@0.0.27 but, apparently, it wasn't completely (as this bug showed up in the latest version). I didn't have time to dig into it, though. I'll try to have a better look next week.

@varadero
Copy link

@ceolinwill
Copy link
Author

ceolinwill commented Jan 21, 2018

I was having a look at this issue. If we import quill from the minified version (dist/quill.min.js), then it works fine (temporarily change the main entry in quill's package.json file to "main": "dist/quill.min.js" and it will work.

I'm not sure if it's a quill or a build-optimizer problem, though. I'm closing this issue as it's not related to ngx-quill.

angular/devkit#403

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

4 participants