ui: downgrade esbuild and graphiql

This commit is contained in:
undefined committed 2023-12-17 21:46:29 +08:00
1 parent ca65b3371f
commit f4c3a630a1
2 files changed
+6 -9

No files matched your search

+4 -6
View File
@@ -1,7 +1,7 @@
/* eslint-disable global-require */ /* eslint-disable global-require */
import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin';
import { EsbuildPlugin } from 'esbuild-loader'; import { ESBuildMinifyPlugin } from 'esbuild-loader';
import { DuplicatesPlugin } from 'inspectpack/plugin'; import { DuplicatesPlugin } from 'inspectpack/plugin';
import ExtractCssPlugin from 'mini-css-extract-plugin'; import ExtractCssPlugin from 'mini-css-extract-plugin';
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'; import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
@@ -17,7 +17,6 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
return { return {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
tsconfigRaw: '{"compilerOptions":{"experimentalDecorators":true}}',
loader: 'tsx', loader: 'tsx',
target: 'es2015', target: 'es2015',
sourcemap: true, sourcemap: true,
@@ -153,14 +152,13 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
}, },
{ {
test: /\.[mc]?[jt]sx?$/, test: /\.[mc]?[jt]sx?$/,
// FIXME latest version on esbuild cannot handle `this` in `DOMAttachedObject` properly exclude: [/@types\//, /components\/message\//, /entry\.js/],
exclude: [/@types\//, /components\//, /pages\//, /entry\.js/],
type: 'javascript/auto', type: 'javascript/auto',
use: [esbuildLoader()], use: [esbuildLoader()],
}, },
{ {
test: /\.[mc]?[jt]sx?$/, test: /\.[mc]?[jt]sx?$/,
include: [/components\//, /pages\//, /entry\.js/], include: [/components\/message\//, /entry\.js/],
type: 'javascript/auto', type: 'javascript/auto',
use: [{ use: [{
loader: 'ts-loader', loader: 'ts-loader',
@@ -216,7 +214,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
}, },
}, },
usedExports: true, usedExports: true,
minimizer: [new EsbuildPlugin({ minimizer: [new ESBuildMinifyPlugin({
css: true, css: true,
minify: true, minify: true,
minifySyntax: true, minifySyntax: true,
+2 -3
View File
@@ -56,11 +56,10 @@
"echarts": "^5.4.3", "echarts": "^5.4.3",
"emojis-keywords": "2.0.0", "emojis-keywords": "2.0.0",
"emojis-list": "2.1.0", "emojis-list": "2.1.0",
"esbuild-loader": "^4.0.2", "esbuild-loader": "^2.21.0",
"fancy-log": "^2.0.0", "fancy-log": "^2.0.0",
"flatpickr": "^4.6.13", "flatpickr": "^4.6.13",
"graphiql": "^3.0.10", "graphiql": "^2.4.7",
"graphql-ws": "^5.14.2",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-iconfont": "^11.0.1", "gulp-iconfont": "^11.0.1",
"gulp-if": "^3.0.0", "gulp-if": "^3.0.0",