davidjbradshaw/iframe-resizer

Module not found when trying to use iFrameResizer via CDN link

Closed this issue · 1 comments

Describe the bug
I get a module not found error on line 1 of index.js when I try to import via a CDN link. That then means window.iFrameResize throws an uncaught exception error.

To Reproduce
Steps to reproduce the behavior:

  1. Open the index.html of any project.
  2. Add an iframe with a unique ID
  3. Add a script tag with the CDN link (https://unpkg.com/iframe-resizer@4.3.2/index.js or https://cdn.jsdelivr.net/npm/iframe-resizer@4.2.11/index.min.js)

Expected behavior
window.iFrameResize should be accessible

Screenshots
Screenshot 2022-01-13 at 18 44 29

Desktop (please complete the following information):

  • OS: MacOS 10
  • Browser: Chrome
  • Version: 97

Found the correct CDN link, for anyone coming here: https://cdn.jsdelivr.net/npm/iframe-resizer@4.2.11/js/iframeResizer.min.js