zendesk / cross-storage

Cross domain local storage, with permissions
Apache License 2.0
2.22k stars 180 forks source link

Angular2 with Webpack #31

Closed timothyblue closed 7 years ago

timothyblue commented 8 years ago

I'm trying to get the cross-storage client to work with webpack but I keep getting the following error:

Unhandled Promise rejection: CrossStorageClient is not defined ; Zone: <root>

I tried require('cross-storage').CrossStorageClient; and import './node_modules/cross-storage/dist/client.min.js'; in my webpack.config but got the same error.

Any ideas would be great.

danielstjules commented 8 years ago

It sounds like the file isn't being included in the bundle at all. Does your list of loaders in the webpack config exclude node_modules by accident? Is your webpack root not the project root (aka node_modules is in a parent or sibling dir) Might have more luck with the webpack issue tracker as well, and posting your webpack conf file.

danielstjules commented 7 years ago

Closing due to inactivity :)