-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not alias Node modules for webpack 4 (#16452)
Fixes #16259 Caused by #16022 Follow up issue: #16450 This PR skips polyfilling Node modules in webpack 4 which are ignored by the `browsers` key.
- Loading branch information
Showing
5 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
test/integration/build-output/fixtures/with-crypto/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { useEffect, useState } from 'react' | ||
import seedrandom from 'seedrandom' | ||
|
||
const rng = seedrandom('hello') | ||
|
||
export default function () { | ||
const [value, setValue] = useState(null) | ||
useEffect(() => { | ||
if (value) return | ||
setValue(rng()) | ||
}, [value]) | ||
return <div>{value == null ? 'loading' : value.toString()}</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15333,6 +15333,11 @@ scss-tokenizer@^0.2.3: | |
js-base64 "^2.1.8" | ||
source-map "^0.4.2" | ||
|
||
[email protected]: | ||
version "3.0.5" | ||
resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" | ||
integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== | ||
|
||
[email protected]: | ||
version "6.18.0" | ||
resolved "https://registry.yarnpkg.com/selenium-standalone/-/selenium-standalone-6.18.0.tgz#011e0672b1b86893f77244a86ddea1b6baadfb87" | ||
|