mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 11:51:41 +03:00
chore(d3-state-visualizer): fix example build (#875)
This commit is contained in:
parent
f454ac8a7f
commit
f23b14cdf0
|
@ -34,6 +34,5 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/static/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -13,22 +13,27 @@
|
|||
"url": "https://github.com/reduxjs/redux-devtools/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "webpack serve --open"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/reduxjs/redux-devtools.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "webpack serve --open"
|
||||
},
|
||||
"dependencies": {
|
||||
"d3-state-visualizer": "^1.4.0",
|
||||
"map2tree": "^1.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/preset-env": "^7.15.6",
|
||||
"@babel/preset-typescript": "^7.15.0",
|
||||
"@types/node": "^14.17.15",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@types/webpack-dev-server": "^4.1.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"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.52.1",
|
||||
|
|
|
@ -20,7 +20,7 @@ const appState = {
|
|||
},
|
||||
};
|
||||
|
||||
const render = tree(document.getElementById('root'), {
|
||||
const render = tree(document.getElementById('root')!, {
|
||||
state: appState,
|
||||
id: 'treeExample',
|
||||
size: 1000,
|
4
packages/d3-state-visualizer/examples/tree/tsconfig.json
Normal file
4
packages/d3-state-visualizer/examples/tree/tsconfig.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"include": ["src"]
|
||||
}
|
|
@ -1,36 +1,43 @@
|
|||
import * as path from 'path';
|
||||
import * as webpack from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||
|
||||
export default {
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: [
|
||||
'webpack-dev-server/client?http://localhost:3000',
|
||||
'webpack/hot/only-dev-server',
|
||||
'./index',
|
||||
mode: 'development',
|
||||
entry: './src/index.ts',
|
||||
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)$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
include: __dirname,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
['@babel/preset-env', { targets: 'defaults' }],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
devServer: {
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
port: 3000,
|
||||
},
|
||||
devtool: 'eval-source-map',
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.react.base.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib"
|
||||
},
|
||||
|
|
|
@ -12414,11 +12414,16 @@ __metadata:
|
|||
version: 0.0.0-use.local
|
||||
resolution: "d3-state-visualizer-tree-example@workspace:packages/d3-state-visualizer/examples/tree"
|
||||
dependencies:
|
||||
"@babel/core": ^7.15.5
|
||||
"@babel/preset-env": ^7.15.6
|
||||
"@babel/preset-typescript": ^7.15.0
|
||||
"@types/node": ^14.17.15
|
||||
"@types/webpack": ^5.28.0
|
||||
"@types/webpack-dev-server": ^4.1.0
|
||||
babel-loader: ^8.2.2
|
||||
d3-state-visualizer: ^1.4.0
|
||||
fork-ts-checker-webpack-plugin: ^6.3.3
|
||||
html-webpack-plugin: ^5.3.2
|
||||
map2tree: ^1.5.0
|
||||
ts-node: ^10.2.1
|
||||
typescript: ~4.3.5
|
||||
|
|
Loading…
Reference in New Issue
Block a user