-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Looks like prior to 1.0.13, crypto
(the webcrypto global) was polyfilled. Now it doesn't seem to be. (Using adapter-cloudflare-workers
if that makes a difference.)
For example: this code will prevent vite build
from completing:
if (typeof crypto === 'undefined') throw new Error('this explodes `vite build`')
Reproduction
Steps to repro:
- Run
npm run build
with SK 1.0.12. Note it builds fine. - Run
npm i -D @sveltejs/[email protected]
- Run
npm run build
and observe thatsrc/pages.js
throws an error becausecrypto
is undefined
Logs
No response
System Info
System:
OS: macOS 13.1
CPU: (8) arm64 Apple M1 Pro
Memory: 1.05 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.10.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.2.0 - /opt/homebrew/bin/npm
Browsers:
Chrome: 109.0.5414.87
Safari: 16.2
npmPackages:
@sveltejs/adapter-auto: ^1.0.0 => 1.0.0
@sveltejs/adapter-cloudflare-workers: ^1.0.0 => 1.0.0
@sveltejs/kit: ^1.0.0 => 1.0.1
svelte: ^3.54.0 => 3.55.0
vite: ^4.0.0 => 4.0.4```
Severity
blocking an upgrade
Additional Information
Tried to debug this as best I could and it may be related to this PR: #8429
(edited for clarity per findings in comments)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working