I want to use the typewriter npm package but I don't understand the example code:
It says... just do npm install, and then do:
import Typewriter from 'typewriter-effect/dist/core';
new Typewriter('#typewriter', {
strings: ['Hello', 'World'],
autoStart: true,
});
I usually use whatever = require('whatever');
when using stuff loaded via npm.
Why is it different in this case and how can I use it?
As far as I know, npm installed stuff gets into a folder inside node_modules. So, why would I move it into the dist folder?
Thanks!