You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see quill has moved from package based import to module based import.
I mean earlier everything used to be imported from dist folder. But with version 2, we can import module from individual file.
This helped with types.
But I guess we should still import css from dist folder.
But I see a weird file .css.js along with .css files.
Can I know what these files are.
node_modules/quill/dist/quill.core.css.js:2:2 - error TS1345: An expression of type 'void' cannot be tested for truthiness.
2 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}(self,(function(){return function(){"use strict";var e={};return e.default}()}));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/quill/dist/quill.core.css.js:2:104 - error TS2304: Cannot find name 'define'.
2 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}(self,(function(){return function(){"use strict";var e={};return e.default}()}));
~~~~~~
node_modules/quill/dist/quill.core.css.js:2:112 - error TS2304: Cannot find name 'define'.
2 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}(self,(function(){return function(){"use strict";var e={};return e.default}()}));
~~~~~~
node_modules/quill/dist/quill.core.css.js:2:123 - error TS2304: Cannot find name 'define'.
2 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}(self,(function(){return function(){"use strict";var e={};return e.default}()}));
~~~~~~
node_modules/quill/dist/quill.core.css.js:2:181 - error TS2339: Property 'Quill' does not exist on type 'Window & typeof globalThis'.
2 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Quill=t():e.Quill=t()}(self,(function(){return function(){"use strict";var e={};return e.default}()}));
Steps for Reproduction
Create react project
Add Editor with quill
Import styles using import 'quill/dist/quill.core.css'; and import 'quill/dist/quill.snow.css';
Compile types using tsc -p src/jsconfig.json --noEmit
Expected behavior:
No errors
Actual behavior:
Errors from *.css.js"
Platforms:
React
Version:
2.0.0-rc.3
The text was updated successfully, but these errors were encountered:
vinodgubbala
changed the title
Importing styles gives and error "An expression of type 'void' cannot be tested for truthiness."
Importing styles gives an error "An expression of type 'void' cannot be tested for truthiness."
Mar 22, 2024
Those .css.js are generated by webpack which should be ignored actually. In the next version we are going to remove it. When importing styles, you would import the .css files.
I see quill has moved from package based import to module based import.
I mean earlier everything used to be imported from
dist
folder. But with version 2, we can import module from individual file.This helped with types.
But I guess we should still import css from
dist
folder.But I see a weird file
.css.js
along with.css
files.Can I know what these files are.
Steps for Reproduction
import 'quill/dist/quill.core.css';
andimport 'quill/dist/quill.snow.css';
tsc -p src/jsconfig.json --noEmit
Expected behavior:
No errors
Actual behavior:
Errors from *.css.js"
Platforms:
React
Version:
2.0.0-rc.3
The text was updated successfully, but these errors were encountered: