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

Package for use with bundlers #2

Closed
c0bra opened this issue Dec 27, 2017 · 7 comments
Closed

Package for use with bundlers #2

c0bra opened this issue Dec 27, 2017 · 7 comments

Comments

@c0bra
Copy link

c0bra commented Dec 27, 2017

Thanks for the great library!

It would be nice to be able to import this into a larger app being bundled by webpack/rollup. Right now the global variable that's defined requires a legacy library plugin to get it in.

@anseki
Copy link
Owner

anseki commented Dec 27, 2017

Hi @c0bra, thank you for the comment.
You can import the library by specifying an entry point to the source code with customary practice.
LeaderLine uses some packages but those are contained by Grunt. Therefore, you can import that with a building script, e.g. Webpack loader that gets like the Gruntfile.js.

@c0bra
Copy link
Author

c0bra commented Dec 28, 2017

Thanks for the tip. I ended up using rollbar-plugin-legacy which works fine except for debugging in the browser.

If I used a loader that executed grunt tasks I'd end up with basically the same minified build file, right? I understand that there's css and whatever else getting appended that you have to bring in.

@anseki
Copy link
Owner

anseki commented Dec 28, 2017

I don't know "rollbar-plugin-legacy" but I used Webpack and loaded the library into my app by using skeleton-loader instead of Grunt.
Sorry, my English is very poor, I hope that these information helps you.

@c0bra
Copy link
Author

c0bra commented Dec 28, 2017

Sorry I meant rollup, not rollbar.

And no worries, I think your English is fine! Thanks for your help.

@olegkorol
Copy link

Were you able to import the library @c0bra?

@c0bra
Copy link
Author

c0bra commented Feb 12, 2018

@olegkorol yes I was able to get it working.

@AdarshPawar29
Copy link

@olegkorol yes I was able to get it working.

How did you import on React typescript app?

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

4 participants