react alies create in webapck

This commit is contained in:
hardiknai-techm
2021-05-13 16:49:57 +05:30
parent 5f977b9419
commit 349a4bb0f2
5 changed files with 524 additions and 474 deletions

View File

@@ -43,6 +43,7 @@ module.exports = {
"@typescript-eslint/no-explicit-any": "error",
"prefer-arrow/prefer-arrow-functions": ["error", { allowStandaloneDeclarations: true }],
eqeqeq: "error",
"react/react-in-jsx-scope": "off",
"react/display-name": "off",
"react-hooks/rules-of-hooks": "warn", // TODO: error
"react-hooks/exhaustive-deps": "warn", // TODO: error

985
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -108,13 +108,13 @@
"@types/codemirror": "0.0.56",
"@types/crossroads": "0.0.30",
"@types/d3": "5.9.2",
"@types/enzyme": "3.10.8",
"@types/dom-to-image": "2.6.2",
"@types/enzyme": "3.10.8",
"@types/hasher": "0.0.31",
"@types/jest": "26.0.23",
"@types/memoize-one": "4.1.1",
"@types/node": "12.11.1",
"@types/mkdirp": "1.0.1",
"@types/node": "12.11.1",
"@types/node-fetch": "2.5.7",
"@types/post-robot": "10.0.1",
"@types/promise.prototype.finally": "2.0.3",
@@ -179,18 +179,18 @@
"typescript": "4.2.4",
"url-loader": "4.1.1",
"wait-on": "4.0.2",
"webpack": "5.36.2",
"webpack": "5.37.0",
"webpack-bundle-analyzer": "4.4.1",
"webpack-cli": "4.7.0",
"webpack-dev-server": "3.11.2"
},
"scripts": {
"start": "webpack serve --mode development",
"start": "webpack serve",
"dev": "echo \"WARNING: npm run dev has been deprecated\" && npm run build",
"build:dataExplorer:ci": "npm run build:ci",
"build": "npm run format:check && npm run lint && npm run compile && npm run compile:strict && npm run pack:prod && npm run copyToConsumers",
"build:ci": "npm run format:check && npm run lint && npm run compile && npm run compile:strict && npm run pack:fast",
"pack:prod": "node --max_old_space_size=10196 ./node_modules/webpack/bin/webpack.js --mode production",
"pack:prod": "node --max_old_space_size=10196 webpack -p",
"pack:fast": "node --max_old_space_size=10196 ./node_modules/webpack/bin/webpack.js --mode development --progress",
"copyToConsumers": "node copyToConsumers",
"test": "rimraf coverage && jest",

View File

@@ -1,7 +1,6 @@
jest.mock("../hooks/useFullScreenURLs");
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import React from "react";
import { useFullScreenURLs } from "../hooks/useFullScreenURLs";
import { OpenFullScreen } from "./OpenFullScreen";

View File

@@ -242,6 +242,7 @@ module.exports = function (_env = {}, argv = {}) {
},
alias: {
process: "process/browser",
react: path.resolve("./node_modules/react"),
},
},
optimization: {