Do you want to request a feature or report a bug?
Bug-ish.
What is the current behavior?
import 'react' (where 'react' is the UMD module build) from an ES module will fail due to rollup/rollup#2274. this is not set in the context of ES modules, so if you try to import 'react' in that context you will get a runtime error since this is undefined and Rollup (before the linked fix) tries to use this when it really means globalThis or self.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
index.html
<!DOCTYPE html>
<head><meta charset='utf-8'></head>
<body>
<script type='module'>
import './node_modules/react/umd/react.development.js'
</script>
</body>
What is the expected behavior?
The React UMD module can be loaded by an ES module.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: 16.11.0
Firefox: 70.0.1
Windows 10
Do you want to request a feature or report a bug?
Bug-ish.
What is the current behavior?
import 'react'(where 'react' is the UMD module build) from an ES module will fail due to rollup/rollup#2274.thisis not set in the context of ES modules, so if you try toimport 'react'in that context you will get a runtime error sincethisis undefined and Rollup (before the linked fix) tries to usethiswhen it really meansglobalThisorself.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
index.htmlWhat is the expected behavior?
The React UMD module can be loaded by an ES module.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: 16.11.0
Firefox: 70.0.1
Windows 10