mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-25 15:40:06 +03:00
chore(react-json-tree): fix example build
This commit is contained in:
parent
09c82b70ab
commit
ab670598a4
|
@ -21,7 +21,8 @@
|
|||
"scripts": {
|
||||
"start": "webpack serve --open",
|
||||
"build": "webpack",
|
||||
"lint": "eslint . --ext .ts"
|
||||
"lint": "eslint . --ext .ts",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"d3-state-visualizer": "^1.4.0",
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"scripts": {
|
||||
"start": "webpack serve --open",
|
||||
"build": "webpack",
|
||||
"lint": "eslint . --ext .ts,.tsx"
|
||||
"lint": "eslint . --ext .ts,.tsx",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.14.0",
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-typescript"
|
||||
]
|
||||
}
|
1
packages/react-json-tree/examples/.eslintignore
Normal file
1
packages/react-json-tree/examples/.eslintignore
Normal file
|
@ -0,0 +1 @@
|
|||
dist
|
|
@ -11,6 +11,5 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/static/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "webpack serve --open",
|
||||
"build": "webpack",
|
||||
"lint": "eslint . --ext .ts,.tsx",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
|
@ -40,6 +41,8 @@
|
|||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-react": "^7.25.3",
|
||||
"fork-ts-checker-webpack-plugin": "^6.3.3",
|
||||
"html-webpack-plugin": "^5.3.2",
|
||||
"ts-node": "^10.2.1",
|
||||
"typescript": "~4.3.5",
|
||||
"webpack": "^5.53.0",
|
||||
|
|
|
@ -1,37 +1,44 @@
|
|||
import * as path from 'path';
|
||||
import * as webpack from 'webpack';
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||
|
||||
module.exports = {
|
||||
mode: isProduction ? 'production' : 'development',
|
||||
entry: [
|
||||
!isProduction && 'webpack-dev-server/client?http://localhost:3000',
|
||||
!isProduction && 'webpack/hot/only-dev-server',
|
||||
'./src/index',
|
||||
].filter(Boolean),
|
||||
mode: 'development',
|
||||
entry: './src/index.tsx',
|
||||
devtool: 'eval-source-map',
|
||||
devServer: {
|
||||
static: './dist',
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: './index.html',
|
||||
}),
|
||||
new ForkTsCheckerWebpackPlugin(),
|
||||
],
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
filename: 'bundle.js',
|
||||
publicPath: '/static/',
|
||||
path: path.join(__dirname, 'dist'),
|
||||
clean: true,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|ts)x$/,
|
||||
loader: 'babel-loader',
|
||||
test: /\.(js|ts)x?$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
['@babel/preset-env', { targets: 'defaults' }],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
devServer: {
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
port: 3000,
|
||||
},
|
||||
devtool: 'eval-source-map',
|
||||
};
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
"url": "https://github.com/reduxjs/redux-devtools.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "cd examples && npm start",
|
||||
"build": "yarn run build:types && yarn run build:js && yarn run build:umd && npm run build:umd:min",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
|
||||
|
|
Loading…
Reference in New Issue
Block a user