1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Update dependency (#5337)

* update node version

* update dependency

* updat i18n

* update seafile-js version

* remove unnecessary dependency

* update seafile-js version

* update react react-dom version

* update react-dev-utils version

* delete unnecessary dependency

* optimize code
This commit is contained in:
杨顺强
2022-12-21 13:30:29 +08:00
committed by GitHub
parent c50fe209ba
commit ca041cc81b
10 changed files with 10243 additions and 5725 deletions

View File

@@ -14,8 +14,6 @@ const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const ESLintPlugin = require('eslint-webpack-plugin');
@@ -25,7 +23,6 @@ const modules = require('./modules');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const postcssNormalize = require('postcss-normalize');
@@ -623,12 +620,6 @@ module.exports = function (webpackEnv) {
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebook/create-react-app/issues/240
isEnvDevelopment && new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebook/create-react-app/issues/186
isEnvDevelopment &&
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
isEnvProduction &&
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
@@ -682,37 +673,6 @@ module.exports = function (webpackEnv) {
// // See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
// maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
// }),
// TypeScript type checking
// useTypeScript &&
// new ForkTsCheckerWebpackPlugin({
// typescript: resolve.sync('typescript', {
// basedir: paths.appNodeModules,
// }),
// async: isEnvDevelopment,
// checkSyntacticErrors: true,
// resolveModuleNameModule: process.versions.pnp
// ? `${__dirname}/pnpTs.js`
// : undefined,
// resolveTypeReferenceDirectiveModule: process.versions.pnp
// ? `${__dirname}/pnpTs.js`
// : undefined,
// tsconfig: paths.appTsConfig,
// reportFiles: [
// // This one is specifically to match during CI tests,
// // as micromatch doesn't match
// // '../cra-template-typescript/template/src/App.tsx'
// // otherwise.
// '../**/src/**/*.{ts,tsx}',
// '**/src/**/*.{ts,tsx}',
// '!**/src/**/__tests__/**',
// '!**/src/**/?(*.)(spec|test).*',
// '!**/src/setupProxy.*',
// '!**/src/setupTests.*',
// ],
// silent: true,
// // The formatter is invoked directly in WebpackDevServerUtils during development
// formatter: isEnvProduction ? typescriptFormatter : undefined,
// }),
isEnvDevelopment && new ESLintPlugin({
// Plugin options
extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],