Iframe-resizer: Can't import iframe-resizer with webpack

Created on 4 Mar 2019  路  6Comments  路  Source: davidjbradshaw/iframe-resizer

When I try to import the iframe-resizer module into my webpack project, using syntax require('iframe-resizer) or import iframe-resizer, I got the following error:

ERROR in ./node_modules/iframe-resizer/index.js
Module not found: Error: Can't resolve './js' in '/home/antoine/swh/swh-environment/swh-web/node_modules/iframe-resizer'
 @ ./node_modules/iframe-resizer/index.js 3:17-32
 @ ./swh/web/assets/src/bundles/vendors/index.js
 @ multi bundles/vendors/index.js

My guess is that the index file inside the js folder is named Index.js but it should be named index.js (no uppercase characters).

Most helpful comment

Published as v4.0.4, sorry for the silly mistake and thanks for the help

All 6 comments

Argh, will try and take a look this evening

If you have a moment to make a PR, that will help, my day job blocks access to github :(

PR #675 opened fixing the issue (I have tested locally and the import error goes away).

Cool I will publish this tonight when I get home, thanks for the help

Literally came across this issue 5 minutes ago, what timing!

Published as v4.0.4, sorry for the silly mistake and thanks for the help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcodev1 picture mcodev1  路  9Comments

Testato picture Testato  路  6Comments

russellballestrini picture russellballestrini  路  4Comments

todesignandconquer picture todesignandconquer  路  9Comments

TarsisDragomir picture TarsisDragomir  路  5Comments