Skip to content

Cannot find module 'imports-loader?this=>window!gsap' #29

@bishopZ

Description

@bishopZ

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 error
Cannot 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions