Use variables generated with browserify

0

I have the following code:

'use strict';

var counterpart = require('counterpart');
var Translate   = require('react-translate-component');

I compile it with Browserify:

browserify nuevo.js > locale.js

I import the file locale.js in my index.html, and when I do it in the first one:

console.log(counterpart);
console.log(Translate);

I throw the error

  

Uncaught ReferenceError: counterpart is not defined

Why is this? How can I access these variables?

    
asked by Genarito 16.02.2018 в 16:39
source

0 answers