how to add Quill to angular-cli project?
Got error when ng serve
Error message: Cannot find module 'Quill'.
In component,
I use
import * as Quill from 'Quill';
, then i got build error
I have already added
"@types/quill": "0.0.26",
"quill": "^1.0.4",
to package.json as dependencies
Anyone can share your experience of adding Quill to your project?
This is a question, please use forum for questions.
http://forum.primefaces.org/viewforum.php?f=35
@hmtai6 You can find instructions on adding Quill at the following link: http://www.primefaces.org/primeng/#/editor
At the bottom of the page, you'll see the instructions:
1.) install Quill with npm
npm install quill --save
2.) Add Quill to scripts in angular-cli.json
"scripts": [... "../node_modules/quill/dist/quill.js"],
3.) Add Quill css to styles in angular-cli.json
"styles": [ ... "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css"],
I can confirm that this works w/ PrimeNG / AngularCLI. I hope that helps :)
Cheers,
Jake
for me it is not working when i build in prod mode : ng build --prod
ERROR in vendor.8b84f0536b8d53a86fbc.bundle.js from UglifyJs Unexpected token: name (levels) [C:/Projets GIT/perso/SortieSportGit/SortieSportProfessionnel/node_modules/quill/core/logger.js:1,0][vendor.8b84f0536b8d53a86fbc.bun dle.js:22968,4]
Do you have any ideas ?
My tsconfig.json file :
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noStrictGenericChecks" : true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2015",
"dom"
]
}
}
I have the same problem as @toregua , it works in dev but not when build with -prod.
Then i just get this
ReferenceError: Quill is not defined at n.ngAfterViewInit (main.bundle.js:1)