mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Iterated on Webpack configs until I got the inline and shell packages seemingly working
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
const chromeManifest = require('../react-devtools-extensions/chrome/manifest.json');
|
||||
const firefoxManifest = require('../react-devtools-extensions/firefox/manifest.json');
|
||||
|
||||
const minChromeVersion = parseInt(chromeManifest.minimum_chrome_version, 10);
|
||||
const minFirefoxVersion = parseInt(
|
||||
firefoxManifest.applications.gecko.strict_min_version,
|
||||
10,
|
||||
);
|
||||
validateVersion(minChromeVersion);
|
||||
validateVersion(minFirefoxVersion);
|
||||
|
||||
function validateVersion(version) {
|
||||
if (version > 0 && version < 200) {
|
||||
return;
|
||||
}
|
||||
throw new Error('Suspicious browser version in manifest: ' + version);
|
||||
}
|
||||
|
||||
module.exports = api => {
|
||||
const isTest = api.env('test');
|
||||
const targets = {};
|
||||
if (isTest) {
|
||||
targets.node = 'current';
|
||||
} else {
|
||||
targets.chrome = minChromeVersion.toString();
|
||||
targets.firefox = minFirefoxVersion.toString();
|
||||
|
||||
// This targets RN/Hermes.
|
||||
targets.ie = '11';
|
||||
}
|
||||
const plugins = [
|
||||
['@babel/plugin-transform-flow-strip-types'],
|
||||
['@babel/plugin-proposal-class-properties', {loose: false}],
|
||||
];
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
plugins.push(['@babel/plugin-transform-react-jsx-source']);
|
||||
}
|
||||
return {
|
||||
plugins,
|
||||
presets: [
|
||||
['@babel/preset-env', {targets}],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-flow',
|
||||
],
|
||||
};
|
||||
};
|
||||
@@ -3,6 +3,7 @@
|
||||
"name": "react-devtools-shared",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@reach/menu-button": "^0.1.17",
|
||||
"@reach/tooltip": "^0.2.2",
|
||||
"clipboard-js": "^0.3.6",
|
||||
|
||||
@@ -97,8 +97,8 @@ export default function DevTools({
|
||||
|
||||
const viewElementSource = useMemo(
|
||||
() => ({
|
||||
canViewElementSourceFunction,
|
||||
viewElementSourceFunction,
|
||||
canViewElementSourceFunction: canViewElementSourceFunction || null,
|
||||
viewElementSourceFunction: viewElementSourceFunction || null,
|
||||
}),
|
||||
[canViewElementSourceFunction, viewElementSourceFunction],
|
||||
);
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class ErrorBoundary extends Component<Props, State> {
|
||||
let bugURL = process.env.GITHUB_URL;
|
||||
if (bugURL) {
|
||||
const title = `Error: "${errorMessage || ''}"`;
|
||||
const label = '😭 bug';
|
||||
const label = 'Component: Developer Tools';
|
||||
|
||||
let body = '<!-- please provide repro information here -->\n';
|
||||
body += '\n---------------------------------------------';
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ export default function SidebarSelectedFiberInfo(_: Props) {
|
||||
});
|
||||
|
||||
const listItems = [];
|
||||
for (let i = 0; i < commitIndices.length; i++) {
|
||||
let i = 0;
|
||||
for (i = 0; i < commitIndices.length; i++) {
|
||||
const commitIndex = commitIndices[i];
|
||||
|
||||
const {duration, timestamp} = profilerStore.getCommitData(
|
||||
|
||||
Reference in New Issue
Block a user