Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

bump nextjs to 15.5 and turbopack for development mode (#24346)

17hz8b74ae683a0a
diff --git a/web/app/styles/globals.css b/web/app/styles/globals.css
index 353cfa2fff5..c1078b6eb64 100644
--- a/web/app/styles/globals.css
+++ b/web/app/styles/globals.css
@@ -1,12 +1,18 @@
@import "preflight.css";
-@tailwind base;
-@tailwind components;
+
@import '../../themes/light.css';
@import '../../themes/dark.css';
@import "../../themes/manual-light.css";
@import "../../themes/manual-dark.css";
+@import "../components/base/button/index.css";
+@import "../components/base/action-button/index.css";
+@import "../components/base/modal/index.css";
+
+@tailwind base;
+@tailwind components;
+
html {
color-scheme: light;
}
@@ -680,10 +686,6 @@ button:focus-within {
display: none;
}
-@import "../components/base/button/index.css";
-@import "../components/base/action-button/index.css";
-@import "../components/base/modal/index.css";
-
@tailwind utilities;
@layer utilities {
diff --git a/web/next.config.js b/web/next.config.js
index 7e89c33e620..9c5e331f341 100644
--- a/web/next.config.js
+++ b/web/next.config.js
@@ -91,12 +91,10 @@ const remoteImageURLs = [hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WE
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
- webpack: (config, { dev, isServer }) => {
- if (dev) {
- config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }))
- }
-
- return config
+ turbopack: {
+ rules: codeInspectorPlugin({
+ bundler: 'turbopack'
+ })
},
productionBrowserSourceMaps: false, // enable browser source map generation during the production build
// Configure pageExtensions to include md and mdx
@@ -112,6 +110,10 @@ const nextConfig = {
})),
},
experimental: {
+ optimizePackageImports: [
+ '@remixicon/react',
+ '@heroicons/react'
+ ],
},
// fix all before production. Now it slow the develop speed.
eslint: {
diff --git a/web/package.json b/web/package.json
index 57ab734eb21..78e62c9aa76 100644
--- a/web/package.json
+++ b/web/package.json
@@ -19,7 +19,7 @@
"and_qq >= 14.9"
],
"scripts": {
- "dev": "cross-env NODE_OPTIONS='--inspect' next dev",
+ "dev": "cross-env NODE_OPTIONS='--inspect' next dev --turbopack",
"build": "next build",
"build:docker": "next build && node scripts/optimize-standalone.js",
"start": "cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js",
@@ -203,7 +203,7 @@
"autoprefixer": "^10.4.20",
"babel-loader": "^10.0.0",
"bing-translate-api": "^4.0.2",
- "code-inspector-plugin": "^0.18.1",
+ "code-inspector-plugin": "1.2.9",
"cross-env": "^7.0.3",
"eslint": "^9.35.0",
"eslint-config-next": "15.5.0",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 5d4308288ca..e47985fd712 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -519,8 +519,8 @@ importers:
specifier: ^4.0.2
version: 4.1.0
code-inspector-plugin:
- specifier: ^0.18.1
- version: 0.18.3
+ specifier: 1.2.9
+ version: 1.2.9
cross-env:
specifier: ^7.0.3
version: 7.0.3
@@ -1372,6 +1372,24 @@ packages:
resolution: {integrity: sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw==}
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-A1w+G73HlTB6S8X6sA6tT+ziWHTAcTyH+7FZ1Sgd3ZLXF/E/jT+hgRbKposjXMwxcbodRc6hBG6UyiV+VxwE6Q==}
+
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-DuyfxGupV43CN8YElIqynAniBtE86i037+3OVJYrm3jlJscXzbV98/kOzvu+VJQQvElcDgpgD6C/aGmPvFEiUg==}
+
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-8N+MHdr64AnthLB4v+YGe8/9bgog3BnkxIW/fqX5iVS0X06mF7X1pxfZOD2bABVtv1tW25lRtNs5AgvYJs0vpg==}
+
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-UVOUbqU6rpi5eOkrFamKrdeSWb0/OFFJQBaxbgs1RK5V5f4/iVwC5KjO2wkjv8cOGU4EppLfBVSBI1ysOo8S5A==}
+
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-saIokJ3o3SdrHEgTEg1fbbowbKfh7J4mYtu0i1mVfah1b1UfdCF/iFHTEJ6SADMiY47TeNZTg0TQWTlU1AWPww==}
+
+ '@code-inspector/[email protected]':
+ resolution: {integrity: sha512-9YEykVrOIc0zMV7pyTyZhCprjScjn6gPPmxb4/OQXKCrP2fAm+NB188rg0s95e4sM7U3qRUpPA4NUH5F7Ogo+g==}
+
'@cspotcode/[email protected]':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
@@ -4425,11 +4443,8 @@ packages:
resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==}
engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'}
- resolution: {integrity: sha512-60pT2cPoguMTUYdN1MMpjoPUnuF0ud/u7M2y+Vqit/bniLEit9dySEWAVxLU/Ukc5ILrDeLKEttc6fCMl9RUrA==}
-
- resolution: {integrity: sha512-d9oJXZUsnvfTaQDwFmDNA2F+AR/TXIxWg1rr8KGcEskltR2prbZsfuu1z70EAn4khpx0smfi/PvIIwNJQ7FAMw==}
+ resolution: {integrity: sha512-PGp/AQ03vaajimG9rn5+eQHGifrym5CSNLCViPtwzot7FM3MqEkGNqcvimH0FVuv3wDOcP5KvETAUSLf1BE3HA==}
resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==}
@@ -5055,9 +5070,6 @@ packages:
resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}
- resolution: {integrity: sha512-FaPt5eFMtW1oXMWqAcqfAJByNagP1V/R9dwDDLQO29JmryMF35+frskTqy+G53whmTaVi19+TCrFqhNbMZH5ZQ==}
-
resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==}
peerDependencies:
@@ -6413,8 +6425,8 @@ packages:
resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==}
engines: {node: '>=0.10'}
- resolution: {integrity: sha512-U7qBxSNk774PxWq4XbmRe0ThiIstPoa4sMH/OGSYxrFVvg8x3biXcF1fsH6wasDpEmEXMdINUrQhBdwsSgKyMg==}
+ resolution: {integrity: sha512-7nXSPQOt3b2JT52Ge8jp4miFcY+nrUEZxNLWBzrEfjmByDTb9b5ytqMSwGhsNwY6Cntwop+6n7rWIFN0+S8PTw==}
resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==}
@@ -8693,9 +8705,6 @@ packages:
resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
- resolution: {integrity: sha512-178H73vbDUHE+JpvfAfioUHlUr7qXCYIEa2YNXtzenFQGOjtae59P1jjcxGfa6pPHEnOoaitb13K+0qxwhi/WA==}
-
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
@@ -8754,9 +8763,6 @@ packages:
engines: {node: '>= 10.13.0'}
hasBin: true
- resolution: {integrity: sha512-3782rsJhBnRiw0IpR6EqnyGDQoiSq0CcGeLJ52rZXlszYCe8igXtcujq7OhI0byaivWQ1LW7sXKyMEoVpBhq0w==}
-
resolution: {integrity: sha512-A4ChP0Qj8oGociTs6UdlRUGANIGrCDL3y+pmQMc+dSsraXHCatFpmMey4mYELA+juqwUqwQsUgJJISXl1KWmiw==}
engines: {node: '>= 14.15.0'}
@@ -9993,6 +9999,48 @@ snapshots:
picocolors: 1.1.1
sisteransi: 1.0.5
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@vue/compiler-dom': 3.5.17
+ chalk: 4.1.2
+ dotenv: 16.6.1
+ launch-ide: 1.2.0
+ portfinder: 1.0.37
+ transitivePeerDependencies:
+ - supports-color
+
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@code-inspector/core': 1.2.9
+ transitivePeerDependencies:
+ - supports-color
+
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@code-inspector/core': 1.2.9
+ transitivePeerDependencies:
+ - supports-color
+
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@code-inspector/core': 1.2.9
+ '@code-inspector/webpack': 1.2.9
+ transitivePeerDependencies:
+ - supports-color
+
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@code-inspector/core': 1.2.9
+ chalk: 4.1.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@code-inspector/[email protected]':
+ dependencies:
+ '@code-inspector/core': 1.2.9
+ transitivePeerDependencies:
+ - supports-color
+
'@cspotcode/[email protected]':
dependencies:
'@jridgewell/trace-mapping': 0.3.9
@@ -12799,7 +12847,7 @@ snapshots:
dependencies:
- '@babel/parser': 7.28.0
+ '@babel/parser': 7.28.4
'@vue/shared': 3.5.17
entities: 4.5.0
estree-walker: 2.0.2
@@ -13503,24 +13551,15 @@ snapshots:
dependencies:
- '@vue/compiler-dom': 3.5.17
+ '@code-inspector/core': 1.2.9
+ '@code-inspector/esbuild': 1.2.9
+ '@code-inspector/mako': 1.2.9
+ '@code-inspector/turbopack': 1.2.9
+ '@code-inspector/vite': 1.2.9
+ '@code-inspector/webpack': 1.2.9
chalk: 4.1.1
- dotenv: 16.6.1
- launch-ide: 1.0.1
- portfinder: 1.0.37
- transitivePeerDependencies:
- - supports-color
-
- dependencies:
- chalk: 4.1.1
- code-inspector-core: 0.18.3
- dotenv: 16.6.1
- esbuild-code-inspector-plugin: 0.18.3
- vite-code-inspector-plugin: 0.18.3
- webpack-code-inspector-plugin: 0.18.3
transitivePeerDependencies:
- supports-color
@@ -14160,12 +14199,6 @@ snapshots:
esast-util-from-estree: 2.0.0
vfile-message: 4.0.2
- dependencies:
- code-inspector-core: 0.18.3
- transitivePeerDependencies:
- - supports-color
-
dependencies:
debug: 4.4.1
@@ -16020,7 +16053,7 @@ snapshots:
dependencies:
language-subtag-registry: 0.3.23
dependencies:
chalk: 4.1.2
dotenv: 16.6.1
@@ -18779,12 +18812,6 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.2
- dependencies:
- code-inspector-core: 0.18.3
- transitivePeerDependencies:
- - supports-color
-
@@ -18855,12 +18882,6 @@ snapshots:
- bufferutil
- utf-8-validate
- dependencies:
- code-inspector-core: 0.18.3
- transitivePeerDependencies:
- - supports-color
-
dependencies:
colorette: 2.0.20
diff --git a/web/tsconfig.json b/web/tsconfig.json
index c3e0bca665e..3b022e47081 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -26,6 +26,9 @@
"paths": {
"@/*": [
"./*"
+ ],
+ "~@/*": [
+ "./*"
]
}
},