From 87a97003c0457d5a8506543c6bdb7b6fd575526c Mon Sep 17 00:00:00 2001 From: Sean Keenan Date: Thu, 5 Nov 2020 15:33:26 -0800 Subject: [PATCH 1/2] react-devtools-inline: Remove css-sourcemap's when bundling for dist Bundling CSS source maps both add unnecessary size, but more importantly cause the css to be served as `blob:`'s. In more restrictive CSP environments this causes react-devtools-inline to fail to load styles. Confirmed that the fix works by building locally and using built react-devtools-inline in a restrictive CSP environment. Specifically: ``` styleSrc: 'unsafe-inline' https: ``` where previously the following would be required: ``` styleSrc: 'unsafe-inline' https: blob: ``` --- packages/react-devtools-inline/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-devtools-inline/webpack.config.js b/packages/react-devtools-inline/webpack.config.js index af829455c6bdd..98920b3508c10 100644 --- a/packages/react-devtools-inline/webpack.config.js +++ b/packages/react-devtools-inline/webpack.config.js @@ -76,7 +76,7 @@ module.exports = { { loader: 'css-loader', options: { - sourceMap: true, + sourceMap: __DEV__, modules: true, localIdentName: '[local]___[hash:base64:5]', }, From fd50558f58658238ad925afa8525b00710a54aff Mon Sep 17 00:00:00 2001 From: Sean Keenan Date: Mon, 9 Nov 2020 23:53:53 -0800 Subject: [PATCH 2/2] trigger build