Closed bishopZ closed 4 years ago
I also created this stackoverflow article.
I'm dealing with the same issue but with Backbone importing $ and window as well. Me and @bishopZ have been chatting about it in Webpack Gitter channel.
I'm also dealing with this and Backbone.
Hi, I seem to experience the same bug with Webpack3. Imports-loader just doesn't work for me. No time now to dig deeper, but I can try if it helps solving the issue. Is the project still alive at all?
The GSAP library that I am loading requires access to the document object. I have research many solutions, but none have worked. How do I expose the document object to that plugin (or to all plugins)?
This page for instance: http://webpack.github.io/docs/shimming-modules.html explains three potential solutions. For me, each one yields a different error message.
If I write import
{TimelineMax} from 'imports?this=>window!gsap';
I get the errorCannot find module 'imports?this=>window!gsap'
The problem is not unique to GSAP; it happens with every library. Imports loader is not recognized by webpack. Even though it is in package.json, has been installed, and other loaders work fine.
"imports-loader": "0.6.5",
Any help appreciated.