Who add React object to the global scope?


#1

Hi, my fiends!

In short:
npm - react@15.2.1
packages - no react package

What I do:
import React from 'react’
console.log(Rect.version)

What I see:
15.2.1

Next step:
React.varsion + Enter in Chrome console

What I see:
15.1.0

Who add React object to my global scope???

Thanx!


#2

Make sure there’s no react package in your versions file too


#3

Maybe also try using Chrome’s developer tools resource search to see if you can find where it’s being defined. For example, here’s a quick screenshot showing how to use the resource search to find where the React global is being set for https://facebook.github.io/react/:


#4

Great! Thanx for it. Ive never use that Search. Try to dig out whats going on.


#5

Only webpack:react package is there in “packages” and accordingly in .versions.


#6

As I noticed using chrome global sources search “15.1.0”, webpack only loads script with that export version. Why its happend, I dont now