A library for loading JavaScript files asynchronously. It loads script files by injecting script tags into DOM during runtime.
You can install this library using npm.
npm install --save @bigcommerce/script-loaderimport { createScriptLoader } from '@bigcommerce/script-loader';
const loader = createScriptLoader();
loader.loadScript('https://code.jquery.com/jquery-3.2.1.min.js')
.then(() => {
console.log('Loaded!');
});To release:
npm run releaseTo see other available commands:
npm runMIT