Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with webpack #42

Closed
biscoe916 opened this issue Oct 28, 2015 · 2 comments
Closed

Use with webpack #42

biscoe916 opened this issue Oct 28, 2015 · 2 comments

Comments

@biscoe916
Copy link

Would love to be able to use this with webpack. Is that possible?

@sstefoss
Copy link

sstefoss commented Nov 2, 2015

@biscoe916 It is:

  1. npm install arrive --save
  2. in module.loaders add this: { test: require.resolve('arrive'), loader: 'imports?this=>window' } so that it can inject the window object in the module (this was the problem with webpack + arrive)
  3. from your code require('arrive')

Don't forget to install https://github.com/webpack/imports-loader

If there is a problem with jquery you might need to use ProvidePlugin too:

new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery', 'window.$': 'jquery' })

@uzairfarooq
Copy link
Owner

I'm going to close as it seems like it's possible. If there's an issue you can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants