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
'use strict';Object.defineProperty(exports,'__esModule',{value: true});varY=require('yjs');varprosemirrorView=require('prosemirror-view');varprosemirrorState=require('prosemirror-state');// Is it required?require('y-protocols/awareness');varmutex=require('lib0/mutex');varPModel=require('prosemirror-model');varmath=require('lib0/math');varobject=require('lib0/object');
I was looking into the code and the only usage of y-protocols/awareness is for the type in the cursor plugin
In typescript the import would have been the following import type { Awareness } from 'y-protocols/awareness' and wont have been shipped into the bundled .cjs
Now the issue is this become required even if you do not make the use of cursor plugin because it has the require('y-protocols/awareness');
Extra context, this error happen to me in a nodejs context where the code is packed to be shiped as a serverless lambda and this dependency should not be needed.
I guess one fix without the need to move to typescrippt would be to remove the top level import and make the import in the jsdoc for the type @param {import('y-protocols/awareness').Awareness} awareness
The text was updated successfully, but these errors were encountered:
We do have the following .cjs output:
I was looking into the code and the only usage of
y-protocols/awareness
is for the type in the cursor pluginIn typescript the import would have been the following
import type { Awareness } from 'y-protocols/awareness'
and wont have been shipped into the bundled .cjsNow the issue is this become required even if you do not make the use of cursor plugin because it has the
require('y-protocols/awareness');
Extra context, this error happen to me in a nodejs context where the code is packed to be shiped as a serverless lambda and this dependency should not be needed.
I guess one fix without the need to move to typescrippt would be to remove the top level import and make the import in the jsdoc for the type
@param {import('y-protocols/awareness').Awareness} awareness
The text was updated successfully, but these errors were encountered: