Skip to content

Upgrade Rollup to 0.68.1+ #17352

Description

@MicahZoltu

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:

npm install react

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions