GeezerVison is showing github.com — Iterated on Webpack configs until I got the inline and shell packages… · react/react@30b8ef3
File treeExpand file treeCollapse file tree Open diff view settings react-devtools-extensions
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-core/webpack.backend.js +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,11 +30,6 @@ module.exports = { | 30 | 30 | library: 'ReactDevToolsBackend', | 31 | 31 | libraryTarget: 'umd', | 32 | 32 | }, | 33 | | - resolve: { | 34 | | - alias: { | 35 | | - src: resolve(__dirname, '../../src'), | 36 | | - }, | 37 | | - }, | 38 | 33 | plugins: [ | 39 | 34 | new DefinePlugin({ | 40 | 35 | __DEV__: true, | @@ -49,7 +44,12 @@ module.exports = { | 49 | 44 | test: /\.js$/, | 50 | 45 | loader: 'babel-loader', | 51 | 46 | options: { | 52 | | - configFile: resolve(__dirname, '../../babel.config.js'), | | 47 | + configFile: resolve( | | 48 | + __dirname, | | 49 | + '..', | | 50 | + 'react-devtools-shared', | | 51 | + 'babel.config.js', | | 52 | + ), | 53 | 53 | }, | 54 | 54 | }, | 55 | 55 | ], | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-core/webpack.standalone.js +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,11 +29,6 @@ module.exports = { | 29 | 29 | library: '[name]', | 30 | 30 | libraryTarget: 'commonjs2', | 31 | 31 | }, | 32 | | - resolve: { | 33 | | - alias: { | 34 | | - src: resolve(__dirname, '../../src'), | 35 | | - }, | 36 | | - }, | 37 | 32 | plugins: [ | 38 | 33 | new DefinePlugin({ | 39 | 34 | __DEV__: false, | @@ -49,7 +44,12 @@ module.exports = { | 49 | 44 | test: /\.js$/, | 50 | 45 | loader: 'babel-loader', | 51 | 46 | options: { | 52 | | - configFile: resolve(__dirname, '../../babel.config.js'), | | 47 | + configFile: resolve( | | 48 | + __dirname, | | 49 | + '..', | | 50 | + 'react-devtools-shared', | | 51 | + 'babel.config.js', | | 52 | + ), | 53 | 53 | }, | 54 | 54 | }, | 55 | 55 | { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/README.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,6 @@ You can also build and install from source: | 12 | 12 | ```sh | 13 | 13 | yarn install | 14 | 14 |
| 15 | | -yarn build:extension:chrome # builds at "packages/react-devtools-extensions/chrome/build" | 16 | | -yarn build:extension:firefox # builds at "packages/react-devtools-extensions/firefox/build" | | 15 | +yarn build:chrome # builds at "packages/react-devtools-extensions/chrome/build" | | 16 | +yarn build:firefox # builds at "packages/react-devtools-extensions/firefox/build" | 17 | 17 | ``` |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/build.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -97,7 +97,7 @@ const postProcess = async (tempPath, destinationPath) => { | 97 | 97 | }; | 98 | 98 |
| 99 | 99 | const main = async buildId => { | 100 | | - const root = join(__dirname, '..', buildId); | | 100 | + const root = join(__dirname, buildId); | 101 | 101 | const manifestPath = join(root, 'manifest.json'); | 102 | 102 | const destinationPath = join(root, 'build'); | 103 | 103 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/chrome/test.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | const chromeLaunch = require('chrome-launch'); | 6 | 6 | const {resolve} = require('path'); | 7 | 7 |
| 8 | | -const EXTENSION_PATH = resolve('shells/browser/chrome/build/unpacked'); | | 8 | +const EXTENSION_PATH = resolve('./chrome/build/unpacked'); | 9 | 9 | const START_URL = 'https://facebook.github.io/react/'; | 10 | 10 |
| 11 | 11 | chromeLaunch(START_URL, { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/firefox/test.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const {exec} = require('child-process-promise'); | 6 | 6 | const {Finder} = require('firefox-profile'); | 7 | 7 | const {resolve} = require('path'); | 8 | 8 |
| 9 | | -const EXTENSION_PATH = resolve('shells/browser/firefox/build/unpacked'); | | 9 | +const EXTENSION_PATH = resolve('./firefox/build/unpacked'); | 10 | 10 | const START_URL = 'https://facebook.github.io/react/'; | 11 | 11 |
| 12 | 12 | const main = async () => { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -50,6 +50,7 @@ type TestRendererOptions = { | 50 | 50 | }; | 51 | 51 |
| 52 | 52 | declare module 'react-test-renderer' { | | 53 | + // eslint-disable-next-line no-inner-declarations | 53 | 54 | declare export type ReactTestRenderer = { | 54 | 55 | toJSON(): null | ReactTestRendererJSON, | 55 | 56 | toTree(): null | ReactTestRendererTree, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/package.json +28Lines changed: 28 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | "name": "react-devtools-extensions", | 4 | 4 | "version": "0.0.0", | 5 | 5 | "private": true, | | 6 | + "scripts": { | | 7 | + "build": "cross-env NODE_ENV=production yarn run build:chrome && yarn run build:firefox", | | 8 | + "build:dev": "cross-env NODE_ENV=development yarn run build:chrome && yarn run build:firefox", | | 9 | + "build:chrome": "cross-env NODE_ENV=production node ./chrome/build", | | 10 | + "build:chrome:crx": "cross-env NODE_ENV=production node ./chrome/build --crx", | | 11 | + "build:chrome:dev": "cross-env NODE_ENV=development node ./chrome/build", | | 12 | + "build:firefox": "cross-env NODE_ENV=production node ./firefox/build", | | 13 | + "build:firefox:dev": "cross-env NODE_ENV=development node ./firefox/build", | | 14 | + "test:chrome": "node ./chrome/test", | | 15 | + "test:firefox": "node ./firefox/test" | | 16 | + }, | 6 | 17 | "devDependencies": { | | 18 | + "@babel/core": "^7.1.6", | | 19 | + "@babel/plugin-proposal-class-properties": "^7.1.0", | | 20 | + "@babel/plugin-transform-flow-strip-types": "^7.1.6", | | 21 | + "@babel/plugin-transform-react-jsx-source": "^7.2.0", | | 22 | + "@babel/preset-env": "^7.1.6", | | 23 | + "@babel/preset-flow": "^7.0.0", | | 24 | + "@babel/preset-react": "^7.0.0", | | 25 | + "archiver": "^3.0.0", | | 26 | + "babel-core": "^7.0.0-bridge", | | 27 | + "babel-eslint": "^9.0.0", | | 28 | + "babel-jest": "^24.7.1", | 7 | 29 | "babel-loader": "^8.0.4", | | 30 | + "chrome-launch": "^1.1.4", | | 31 | + "child-process-promise": "^2.2.1", | 8 | 32 | "css-loader": "^1.0.1", | | 33 | + "firefox-profile": "^1.0.2", | | 34 | + "node-libs-browser": "0.5.3", | | 35 | + "nullthrows": "^1.0.0", | 9 | 36 | "raw-loader": "^3.1.0", | 10 | 37 | "style-loader": "^0.23.1", | | 38 | + "web-ext": "^3.0.0", | 11 | 39 | "webpack": "^4.26.0", | 12 | 40 | "webpack-cli": "^3.1.2", | 13 | 41 | "webpack-dev-server": "^3.3.1" | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/webpack.backend.js +11-2Lines changed: 11 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,6 +10,8 @@ if (!NODE_ENV) { | 10 | 10 | process.exit(1); | 11 | 11 | } | 12 | 12 |
| | 13 | +const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules'); | | 14 | + | 13 | 15 | const __DEV__ = NODE_ENV === 'development'; | 14 | 16 |
| 15 | 17 | const GITHUB_URL = getGitHubURL(); | @@ -27,7 +29,9 @@ module.exports = { | 27 | 29 | }, | 28 | 30 | resolve: { | 29 | 31 | alias: { | 30 | | - src: resolve(__dirname, '../../../src'), | | 32 | + react: resolve(builtModulesDir, 'react'), | | 33 | + 'react-dom': resolve(builtModulesDir, 'react-dom'), | | 34 | + scheduler: resolve(builtModulesDir, 'scheduler'), | 31 | 35 | }, | 32 | 36 | }, | 33 | 37 | plugins: [ | @@ -44,7 +48,12 @@ module.exports = { | 44 | 48 | test: /\.js$/, | 45 | 49 | loader: 'babel-loader', | 46 | 50 | options: { | 47 | | - configFile: resolve(__dirname, '../../../babel.config.js'), | | 51 | + configFile: resolve( | | 52 | + __dirname, | | 53 | + '..', | | 54 | + 'react-devtools-shared', | | 55 | + 'babel.config.js', | | 56 | + ), | 48 | 57 | }, | 49 | 58 | }, | 50 | 59 | ], | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/webpack.config.js +15-1Lines changed: 15 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,6 +10,8 @@ if (!NODE_ENV) { | 10 | 10 | process.exit(1); | 11 | 11 | } | 12 | 12 |
| | 13 | +const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules'); | | 14 | + | 13 | 15 | const __DEV__ = NODE_ENV === 'development'; | 14 | 16 |
| 15 | 17 | const GITHUB_URL = getGitHubURL(); | @@ -30,6 +32,13 @@ module.exports = { | 30 | 32 | path: __dirname + '/build', | 31 | 33 | filename: '[name].js', | 32 | 34 | }, | | 35 | + resolve: { | | 36 | + alias: { | | 37 | + react: resolve(builtModulesDir, 'react'), | | 38 | + 'react-dom': resolve(builtModulesDir, 'react-dom'), | | 39 | + scheduler: resolve(builtModulesDir, 'scheduler'), | | 40 | + }, | | 41 | + }, | 33 | 42 | plugins: [ | 34 | 43 | new DefinePlugin({ | 35 | 44 | __DEV__: false, | @@ -45,7 +54,12 @@ module.exports = { | 45 | 54 | test: /\.js$/, | 46 | 55 | loader: 'babel-loader', | 47 | 56 | options: { | 48 | | - configFile: resolve(__dirname, '../babel.config.js'), | | 57 | + configFile: resolve( | | 58 | + __dirname, | | 59 | + '..', | | 60 | + 'react-devtools-shared', | | 61 | + 'babel.config.js', | | 62 | + ), | 49 | 63 | }, | 50 | 64 | }, | 51 | 65 | { | |
|