import * as Toastr from 'toastr'; import './/../node_modules/toastr/build/toastr.css'; //You need style and css loader installed and set Toastr.options.timeout = 2000; //Change the settings Toastr.info('This works!');