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 @@
|
||||
Harness for testing local changes to the `react-devtools-inline` and `react-devtools-shared` packages.
|
||||
@@ -2,7 +2,32 @@
|
||||
"private": true,
|
||||
"name": "react-devtools-shell",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=development cross-env TARGET=remote webpack --config webpack.config.js",
|
||||
"deploy": "yarn run build && now deploy && now alias react-devtools-experimental",
|
||||
"start": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server --open"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native-web": "^0.11.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.6",
|
||||
"@babel/plugin-proposal-class-properties": "^7.1.0",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.1.6",
|
||||
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
|
||||
"@babel/preset-env": "^7.1.6",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"babel-core": "^7.0.0-bridge",
|
||||
"babel-eslint": "^9.0.0",
|
||||
"babel-jest": "^24.7.1",
|
||||
"babel-loader": "^8.0.4",
|
||||
"cross-env": "^3.1.4",
|
||||
"css-loader": "^1.0.1",
|
||||
"raw-loader": "^3.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.26.0",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-dev-server": "^3.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ if (!TARGET) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const __DEV__ = NODE_ENV === 'development';
|
||||
const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');
|
||||
|
||||
const root = resolve(__dirname, '../..');
|
||||
const __DEV__ = NODE_ENV === 'development';
|
||||
|
||||
const GITHUB_URL = getGitHubURL();
|
||||
const DEVTOOLS_VERSION = getVersionString();
|
||||
@@ -33,11 +33,9 @@ const config = {
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'react-devtools-inline': resolve(
|
||||
root,
|
||||
'packages/react-devtools-inline/src/',
|
||||
),
|
||||
src: resolve(root, 'src'),
|
||||
react: resolve(builtModulesDir, 'react'),
|
||||
'react-dom': resolve(builtModulesDir, 'react-dom'),
|
||||
scheduler: resolve(builtModulesDir, 'scheduler'),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
@@ -54,7 +52,12 @@ const config = {
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
configFile: resolve(root, 'babel.config.js'),
|
||||
configFile: resolve(
|
||||
__dirname,
|
||||
'..',
|
||||
'react-devtools-shared',
|
||||
'babel.config.js',
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user