Closed HDianaz closed 1 year ago
You can’t import a module from a URL with typescript.
Browsers support ES Modules where you can do such imports.
However TypeScript has a build/compile step and it doesn’t know how to resolve an import like this.
For a TS project you will need to npm install picmo and then just import from ‘picmo’.
Thank you so much!
I tried to import into my ts file the library with the CDN like this:
import { createPicker } from 'https://unpkg.com/picmo@latest/dist/index.js';
And it gives me the following error:
Cannot find module 'https://unpkg.com/picmo@latest/dist/index.js' or its corresponding type declarations
Can anyone help me on that? Thanks in advance!