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-loader
import { 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 release
To see other available commands:
npm run
MIT