From 5cd7f1b66aa0e154827624b9b544b03fd3d2bc51 Mon Sep 17 00:00:00 2001 From: Luca Ban Date: Fri, 30 Mar 2018 14:30:31 +0900 Subject: [PATCH] added ES6 import --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 097b841e..228ec2a5 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,15 @@ The FOUT can be more easily avoided when loading the Web Font Loader synchronous Web Font Loader is also available on npm as a CommonJS module. Just `npm install webfontloader` and then require it in your code. ```js - var WebFont = require('webfontloader'); +var WebFont = require('webfontloader'); +// or for ES6 import +import WebFont from 'webfontloader' - WebFont.load({ - google: { - families: ['Droid Sans', 'Droid Serif'] - } - }); +WebFont.load({ + google: { + families: ['Droid Sans', 'Droid Serif'] + } +}); ``` ## Configuration