Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Server still uses "eval" in some contexts, despite being fixed in 5.0.1 #5402

Closed
dfoley-greenlight opened this issue Jan 16, 2025 · 1 comment

Comments

@dfoley-greenlight
Copy link

Bug report

Dev Server still requires "unsafe-eval" CSP when one specifies a filter predicate for Client.Overlay.RuntimeErrors
I am using v5.2. A similar issue was fixed in v5.0.1.

Actual Behavior

Config like below will result in an error on launch of app unless CSP includes "unsafe-eval":

Image

Expected Behavior

"unsafe-eval" should not be necessary to filter certain errors out of overlay

How Do We Reproduce?

Please paste the results of npx webpack-cli info here, and mention other relevant information

copy-webpack-plugin: ^11.0.0 => 11.0.0
css-loader: ^6.7.3 => 6.7.3
css-minimizer-webpack-plugin: ^5.0.0 => 5.0.0
eslint-import-resolver-webpack: ^0.13.2 => 0.13.2
file-loader: ^6.2.0 => 6.2.0
html-webpack-plugin: ^5.5.0 => 5.5.0
postcss-loader: ^7.1.0 => 7.1.0
sass-loader: ^13.2.2 => 13.2.2
style-loader: ^3.3.2 => 3.3.2
terser-webpack-plugin: ^5.3.7 => 5.3.10
ts-loader: ^9.4.2 => 9.4.2
tsconfig-paths-webpack-plugin: ^4.1.0 => 4.1.0
url-loader: ^4.1.1 => 4.1.1
webpack: ^5.97.1 => 5.97.1
webpack-bundle-analyzer: ^4.8.0 => 4.8.0
webpack-cli: ^6.0.1 => 6.0.1
webpack-dev-server: ^5.2.0 => 5.2.0
webpack-merge: ^5.8.0 => 5.8.0
@alexander-akait
Copy link
Member

We use new Function to pass overlay runtime values from your configuration to runtime code (when you want to filter something), we can't solve it without eval/new Function(), so please configuration your development env to allow, sorry, we really can't provide this logic without evil eval, feel free to feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants