@lobehub/chat 1.137.1 → 1.137.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.137.2](https://github.com/lobehub/lobe-chat/compare/v1.137.1...v1.137.2)
6
+
7
+ <sup>Released on **2025-10-14**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix the Worker URL cross-origin issue.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix the Worker URL cross-origin issue, closes [#9624](https://github.com/lobehub/lobe-chat/issues/9624) ([d379112](https://github.com/lobehub/lobe-chat/commit/d379112))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.137.1](https://github.com/lobehub/lobe-chat/compare/v1.137.0...v1.137.1)
6
31
 
7
32
  <sup>Released on **2025-10-14**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix the Worker URL cross-origin issue."
6
+ ]
7
+ },
8
+ "date": "2025-10-14",
9
+ "version": "1.137.2"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/next.config.ts CHANGED
@@ -19,9 +19,11 @@ const standaloneConfig: NextConfig = {
19
19
  outputFileTracingIncludes: { '*': ['public/**/*', '.next/static/**/*'] },
20
20
  };
21
21
 
22
+ const assetPrefix = process.env.NEXT_PUBLIC_ASSET_PREFIX;
23
+
22
24
  const nextConfig: NextConfig = {
23
25
  ...(isStandaloneMode ? standaloneConfig : {}),
24
- assetPrefix: process.env.NEXT_PUBLIC_ASSET_PREFIX,
26
+ assetPrefix,
25
27
  compiler: {
26
28
  emotion: true,
27
29
  },
@@ -309,6 +311,20 @@ const nextConfig: NextConfig = {
309
311
  zipfile: false,
310
312
  };
311
313
 
314
+ if (assetPrefix && (assetPrefix.startsWith('http://') || assetPrefix.startsWith('https://'))) {
315
+ // fix the Worker URL cross-origin issue
316
+ // refs: https://github.com/lobehub/lobe-chat/pull/9624
317
+ config.module.rules.push({
318
+ generator: {
319
+ // @see https://webpack.js.org/configuration/module/#rulegeneratorpublicpath
320
+ publicPath: '/_next/',
321
+ },
322
+ test: /worker\.ts$/,
323
+ // @see https://webpack.js.org/guides/asset-modules/
324
+ type: 'asset/resource',
325
+ });
326
+ }
327
+
312
328
  return config;
313
329
  },
314
330
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.137.1",
3
+ "version": "1.137.2",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",