react-devtools-core standalone bugfix: prevent electron crash
CSS source maps require the style-loader to use URL.createObjectURL (rather than just a <style> tag). For some reason, this crashes Electron's webview process, which completely breaks the embedded extension inside of Nuclide and other Electron apps. This commit turns (CSS) source maps off for production builds to avoid this crash.
This commit is contained in:
parent
76c67399db
commit
7385de9fc2
|
@ -57,7 +57,11 @@ module.exports = {
|
|||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
// WARNING It's important that we disable CSS source maps for production builds.
|
||||
// This causes style-loader to insert styles via a <style> tag rather than URL.createObjectURL,
|
||||
// which in turn avoids a nasty Electron/Chromium bug that breaks DevTools in Nuclide.
|
||||
// (Calls to URL.createObjectURL seem to crash the webview process.)
|
||||
sourceMap: __DEV__,
|
||||
modules: true,
|
||||
localIdentName: '[local]___[hash:base64:5]',
|
||||
},
|
||||
|
|
|
@ -59,7 +59,7 @@ module.exports = {
|
|||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sourceMap: __DEV__,
|
||||
modules: true,
|
||||
localIdentName: '[local]___[hash:base64:5]',
|
||||
},
|
||||
|
|
|
@ -57,7 +57,7 @@ const config = {
|
|||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sourceMap: __DEV__,
|
||||
modules: true,
|
||||
localIdentName: '[local]___[hash:base64:5]',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue