I want to use Tokenize2 in node.js (commonjs).
but const tokenize2 = require('./scripts/tokenize2.js'); does not work.
Can anyone help me how to use it in node.js?
I want to use Tokenize2 in node.js (commonjs).
but const tokenize2 = require('./scripts/tokenize2.js'); does not work.
Can anyone help me how to use it in node.js?
It depends on where and how you've called the script, looking here: https://zellerda.github.io/Tokenize2/ it claims that the file (when compiled) is called: tokenize2.min.js
So perhaps you should try: