-
Notifications
You must be signed in to change notification settings - Fork 786
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
Create tiny-slider.module.js #39
Conversation
Thanks @tzsk ,
So you tried to import "/src/tiny-slider.module.js", and it's not working? |
@ganlanyuan Yes. That's exactly the change I've made and it is working now. But strangely the The thing that is bugging me is that, I've also tested it with |
I see,
Is there any requirement for react to load plugins? Like a config file or
something else.
…On Thu, May 11, 2017, 5:07 AM Kazi Mainuddin Ahmed ***@***.***> wrote:
@ganlanyuan <https://github.com/ganlanyuan> Yes. That's exactly the
change I've made and it is working now.
I've tested it with create-react-app
<https://github.com/facebookincubator/create-react-app> and
react-webpack-redux
<https://github.com/stylesuxx/generator-react-webpack-redux>
But strangely the /src/tiny-slider.module.js is not working with any of
them.
The thing that is bugging me is that, I've also tested it with Angular 2/4
and for that, the new file is not working but the old file i.e.
src/tiny-slider.module.js is working fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AExGm-kCpP55WEpvaviXCMFddiDxjr_fks5r4s_ngaJpZM4NXF7Y>
.
|
Is this PR ready to merge? I would love to have the npm package updated so I can start using the module. |
Merge it for now. |
Thanks so much @ganlanyuan. Can you publish the npm package as well? |
v1.5.1 was published. |
@ganlanyuan Sorry for the late response. But I was looking for other solutions to make it work other than using two separate file for React and Angular 2. And I have found something. In the new way we don't need the new file that I have created. And both Angular 2 and React can use the same file and the API Docs that you wrote in README.md doesn't need to change. In the new way we can call the file the same way as the docs suggest. import { tns } from 'tiny-slider/src/tiny-slider.module' I'll post the PR right away. |
this is the fix for the Issue with Webpack module loading with React, i.e. #20
Now. from a React Component it is to be imported like below:
import tns from 'tiny-slider/dist/tiny-slider.module'
And inside the React Component it can be used as the documentation suggested.
Ex: