Modules are not loaded properly when using NPM
Hi Tim,
I'm using Node and NPM. After I do npm install, the following modules are not loaded:
rangy-classapplier.js rangy-highlighter.js rangy-selectionsaverestore.js rangy-serializer.js rangy-textrange.js
I took a closer look, I see that the module files are included in the npm package, but are not loaded properly via package.json.
I am using this workaround:
import rangy from 'rangy';
import rangyHighlight from 'rangy/lib/rangy-highlighter';
import rangyClassApplier from 'rangy/lib/rangy-classapplier';
import rangyTextRange from 'rangy/lib/rangy-textrange';
import rangySerializer from 'rangy/lib/rangy-serializer';
Thanks man!
Apologies. I have had other priorities in recent months. I'll get to this as soon as I can.
@timdown How would you go about it? I could take a look at it and send a PR.
This caught me too, but you might want to leave it as-is and document it.
In the current state, you can only require the parts of the library you need, which is kind of nice.
Encountered this, this really needs to be documented.
@LeZuse Thanks man but youdon't need to use named imports this peace of code works also
import rangy from 'rangy';
import 'rangy/lib/rangy-classapplier';
import 'rangy/lib/rangy-highlighter';
import 'rangy/lib/rangy-textrange';
import 'rangy/lib/rangy-serializer';
:+1: faced this