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

Any support for import of driver in React? #11

Closed
jeffreyabarrios opened this issue Mar 13, 2018 · 8 comments
Closed

Any support for import of driver in React? #11

jeffreyabarrios opened this issue Mar 13, 2018 · 8 comments

Comments

@jeffreyabarrios
Copy link

No description provided.

@kamranahmedse
Copy link
Owner

kamranahmedse commented Mar 13, 2018

You can use it by simply importing as you would do with any other library.

For a react wrapper, we have it planned, hopefully in the coming weekend.

Just want to finish this rewrite before we start with the wrappers.

@roelvan
Copy link

roelvan commented Mar 13, 2018

I am having a Babel import problem, any idea how to use this? I am using Vue client and this is my import statement: import Driver from 'driver.js'. My error:

This dependency was not found:

* driver.js in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/Users/roel/Repos/dsmtw-v2-engine/node_modules/.cache/cache-loader"}!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/lobby.vue

To install it, you can run: npm install --save driver.js

@wave52
Copy link

wave52 commented Mar 13, 2018

You can
import Driver from 'driver.js/dist/driver.min.js'

@kamranahmedse
Copy link
Owner

@roelvan could you please try now? there was an issue with main definition in package.json. It should be fixed now

@roelvan
Copy link

roelvan commented Mar 13, 2018

@roelvan could you please try now? there was an issue with main definition in package.json. It should be fixed now

Yep that did the trick. Now it works.

@kamranahmedse
Copy link
Owner

Cool, thanks

@Rutulpatel7077
Copy link

It's disappearing when life cycle render the main component.

@ghost
Copy link

ghost commented Mar 14, 2019

I've used driver.js with require in an ES Module project and it worked very well. Try it, if it's working then there's no need to use the import syntax.

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

5 participants