Add import without links necessity
guilhermedjr opened this issue · comments
Is there a way to use toastr (in React apps, for example) without needing to add css and js links in html, just doing imports? I'm really missing this possibility, and I think it's super necessary for other people too.
If this possibility exists, it would be good to see it on the documentation.
There is a npm package that i haven't tried yet.
From the docs i'd say, you'll have to add on your app.js the following (I haven't tried it, im just following intuition):
import 'toastr';
Yet for the css.. unless you use sass or similar, there doesn't seem to be any raw css file to import from the npm package.
Just to have @guilhermedjr answer in raw text:
import * as toastr from 'toastr'
import 'toastr/build/toastr.min.css';