-
Notifications
You must be signed in to change notification settings - Fork 28
chore: add resources #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add resources #183
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "webview": "webview.66e57793.js", | ||
| "webview/index.html": "webview.805ab470/index.html", | ||
| "worker-host": "worker-host.490aafa0.js" | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <!doctype html><html lang="en" style="width: 100%; height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Webview Panel Container</title><script crossorigin src="../webview.66e57793.js"></script></head><body style="margin: 0; overflow: hidden; width: 100%; height: 100%"></body></html> |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| /*! | ||
| * +----------------------------------------------------------------------------------+ | ||
| * | murmurHash3.js v3.0.0 (http://github.com/karanlyons/murmurHash3.js) | | ||
| * | A TypeScript/JavaScript implementation of MurmurHash3's hashing algorithms. | | ||
| * |----------------------------------------------------------------------------------| | ||
| * | Copyright (c) 2012-2020 Karan Lyons. Freely distributable under the MIT license. | | ||
| * +----------------------------------------------------------------------------------+ | ||
| */ | ||
|
|
||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <http://feross.org> | ||
| * @license MIT | ||
| */ | ||
|
|
||
| /*! | ||
| * The buffer module from node.js, for the browser. | ||
| * | ||
| * @author Feross Aboukhadijeh <https://feross.org> | ||
| * @license MIT | ||
| */ | ||
|
|
||
| /*! ***************************************************************************** | ||
| Copyright (C) Microsoft. All rights reserved. | ||
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
| this file except in compliance with the License. You may obtain a copy of the | ||
| License at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
| WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
| MERCHANTABLITY OR NON-INFRINGEMENT. | ||
|
|
||
| See the Apache Version 2.0 License for specific language governing permissions | ||
| and limitations under the License. | ||
| ***************************************************************************** */ | ||
|
|
||
| /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
|
||
| /** | ||
| * @license React | ||
| * react.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ module.exports = (option = {}) => { | |
| }, | ||
| output: { | ||
| filename: `[name].${isDev ? 'js' : '[contenthash:8].js'}`, | ||
| path: path.resolve(__dirname, `../dist`), | ||
| path: path.resolve(__dirname, '../../sumi-core/resources'), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip Codebase Verification 需要全面更新项目以适应新的输出目录 在检查过程中,我们发现了以下问题:
建议采取以下措施:
这个更改比预期的要复杂,需要对项目进行更广泛的修改。建议在进行这些更改时保持谨慎,并在每个阶段进行充分的测试。 Analysis chain验证输出目录变更的影响 输出目录从
可以运行以下脚本来验证输出目录的变更是否影响了构建过程和项目的其他部分: 请运行上述验证脚本,确保输出目录的变更不会引入问题。如果验证不通过,请更新受影响的文件和配置。 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 构建项目
npm run build
# 检查新的输出目录是否存在且包含预期的文件
if [ ! -d "packages/sumi-core/resources" ]; then
echo "新的输出目录 packages/sumi-core/resources 不存在,请检查配置。"
exit 1
fi
# 搜索项目中引用旧输出目录 ../dist 的文件
num_old_refs=$(grep -R --include=\*.{js,ts,jsx,tsx,html,css} "../dist" | wc -l)
if [ $num_old_refs -gt 0 ]; then
echo "发现 $num_old_refs 处引用了旧的输出目录 ../dist,请相应更新。"
# 列出引用位置供参考
grep -R --include=\*.{js,ts,jsx,tsx,html,css} "../dist"
exit 1
fi
echo "输出目录变更验证通过。"
Length of output: 23973 Script: #!/bin/bash
# 检查 webpack 配置文件中的新输出目录
echo "检查 webpack 配置文件中的新输出目录:"
grep -n "path.resolve(__dirname, '../../sumi-core/resources')" packages/toolkit/webpack/config.webview.js
# 列出包含 "../dist" 引用的文件
echo -e "\n包含 '../dist' 引用的文件列表:"
grep -R --include=\*.{js,ts,jsx,tsx,json} "../dist" . | cut -d: -f1 | sort | uniq
# 搜索可能需要更新的其他配置文件
echo -e "\n可能需要更新的其他配置文件:"
find . -name "*.config.js" -o -name "*.json" | xargs grep -l "dist"
Length of output: 5637 |
||
| }, | ||
| devtool: isDev ? 'inline-source-map' : false, | ||
| mode: isDev ? 'development' : 'production', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node.js 版本升级需要彻底测试!
Node.js 的最低版本要求已经从
10.0.0提升到18.0.0,跳过了几个主要版本。直接从 Node.js 10.x 升级到 18.x 可能会引入兼容性问题,因为这些版本之间有许多变化和改进。