You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using next-yak0.2.1 on StackBlitz, the compilation fails due to a security error preventing the loading of a local resource.
Chrome/Brave:
Not allowed to load local resource: file:///home/projects/stackblitz-starters-bp97wq/node_modules/next-yak/dist/loaders/tsloader.js
Firefox:
Security error: Content on https://stackblitzstartersbp97wq-hlff.w-corp-staticblitz.com/iframe.70dbe416.html is not allowed to load or link file:///home/projects/stackblitz-starters-bp97wq/node_modules/next-yak/dist/loaders/tsloader.js
Safari:
[Error] Cannot load file:///home/projects/stackblitz-starters-bp97wq/node_modules/next-yak/dist/loaders/tsloader.js due to access control checks.
[Error] Failed to load resource: Cross origin requests are only supported for HTTP. (tsloader.js, line 0)
The problem arises because next-yak integrates into the Next.js config and injects a webpack loader using an absolute path (e.g., /home/projects/stackblitz-starters-bp97wq/node_modules/next-yak/dist/loaders/tsloader.js).
As soon as Next.js triggers the compilation and attempts to execute the loader, it fails due to the security restrictions in StackBlitz's environment
Browser name = Chrome
Full version = 126.0.0.0
Major version = 126
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 273394398,
"usedJSHeapSize": 226013986,
"jsHeapSizeLimit": 4294705152
}
Hash = 70dbe416
Describe the bug
When using next-yak
0.2.1
on StackBlitz, the compilation fails due to a security error preventing the loading of a local resource.Chrome/Brave:
Firefox:
Safari:
The problem arises because next-yak integrates into the Next.js config and injects a webpack loader using an absolute path (e.g., /home/projects/stackblitz-starters-bp97wq/node_modules/next-yak/dist/loaders/tsloader.js).
As soon as Next.js triggers the compilation and attempts to execute the loader, it fails due to the security restrictions in StackBlitz's environment
Link to the blitz that caused the error
https://stackblitz.com/edit/stackblitz-starters-bp97wq
Steps to reproduce
Expected behavior
The project should compile and run successfully, as it does in a local environment
Parity with Local
Screenshots
Platform
Additional context
Worked before with next-yak 0.2.0:
https://stackblitz.com/edit/stackblitz-starters-dfykqy?file=app%2Fpage.tsx
The text was updated successfully, but these errors were encountered: