i-rocky/country-list-js

Make it clearer on how to use on the web with country.min.js

Closed this issue · 3 comments

where does the country variable come from
ive also tried importing as a module and still no luck

ekkis commented

the country variable holds the module itself. as indicated on the README:

// using ES6 modules

import country from 'country-list-js';

// using CommonJS modules
var country = require('country-list-js'); 

the country variable holds the module itself. as indicated on the README:

// using ES6 modules

import country from 'country-list-js';

// using CommonJS modules
var country = require('country-list-js'); 

just gives me an error saying there is no default module export

ekkis commented

I provided 2 modalities. if one doesn't work for you, try the other