Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Use with React & Webpack #6

Closed
olegkorol opened this issue Feb 12, 2018 · 6 comments
Closed

Use with React & Webpack #6

olegkorol opened this issue Feb 12, 2018 · 6 comments

Comments

@olegkorol
Copy link

Hi,

how can this library be imported in e.g. a React app with Webpack?

Thanks.

@anseki
Copy link
Owner

anseki commented Feb 12, 2018

Hi @olegkorol, thank you for the comment.
This may help you: #2

@olegkorol
Copy link
Author

Thanks for the quick reply, @anseki.

Do you have an example on how you loaded the library with skeleton-loader? That would be much appreciated.

Thanks again.

@anseki
Copy link
Owner

anseki commented Feb 12, 2018

Some example codes are here:
https://github.com/anseki/skeleton-loader
You can call Grunt in the procedure or make the procedure work like the Gruntfile.js.

@olegkorol
Copy link
Author

Ok, thanks.

I ended up just loading it as an external dependency in index.html. Works just fine.

@anseki
Copy link
Owner

anseki commented Feb 12, 2018

😄

@logesh-freshworks
Copy link

logesh-freshworks commented Jan 3, 2019

@olegkorol I am using it in a react project @anseki answer worked fine for me. Try this in your webpack.config.js

{
      test: require('path').resolve(__dirname, 'node_modules/leader-line/'),
      loader: 'skeleton-loader',
      options: { procedure: content => `${content} export default LeaderLine` }      
}

of course, don't forget to install skeleton-loader

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

No branches or pull requests

3 participants